Class ByteChunk


  • public class ByteChunk
    extends Chunk
    A Chunk that holds binary data, normally unparsed. Generally as we know how to make sense of the contents, we create a new Chunk class and add a special case in the parser for them.
    • Constructor Detail

      • ByteChunk

        public ByteChunk​(String namePrefix,
                         int chunkId,
                         Types.MAPIType type)
        Creates a Byte Chunk.
      • ByteChunk

        public ByteChunk​(int chunkId,
                         Types.MAPIType type)
        Create a Byte Chunk, with the specified type.
    • Method Detail

      • getValue

        public byte[] getValue()
      • setValue

        public void setValue​(byte[] value)
      • toString

        public String toString()
        Returns the data in a debug-friendly string format
        Overrides:
        toString in class Object
      • getAs7bitString

        public String getAs7bitString()
        Returns the data, formatted as a string assuming it was a non-unicode string. If your data isn't in fact stored as basically ASCII, don't expect this to return much of any sense....
        Returns:
        the data formatted as a string