Class ByteChunkDeferred


  • public class ByteChunkDeferred
    extends ByteChunk
    A Chunk that either acts as ByteChunk (if not initialized with a node) or lazy loads its binary data from the document (if linked with a node via readValue(DocumentNode)).
    • Constructor Detail

      • ByteChunkDeferred

        public ByteChunkDeferred​(java.lang.String namePrefix,
                                 int chunkId,
                                 Types.MAPIType type)
        Creates a Byte Stream Chunk, with the specified type.
    • Method Detail

      • readValue

        public void readValue​(DocumentNode node)
        Links the chunk to a document
        Parameters:
        node - the document node
      • readValue

        public void readValue​(java.io.InputStream value)
                       throws java.io.IOException
        Description copied from class: Chunk
        Reads the value of this chunk using an InputStream
        Overrides:
        readValue in class ByteChunk
        Throws:
        java.io.IOException
      • writeValue

        public void writeValue​(java.io.OutputStream out)
                        throws java.io.IOException
        Description copied from class: Chunk
        Writes the value of this chunk back out again.
        Overrides:
        writeValue in class ByteChunk
        Throws:
        java.io.IOException
      • getValue

        public byte[] getValue()
        Get bytes directly.
        Overrides:
        getValue in class ByteChunk
      • setValue

        public void setValue​(byte[] value)
        Set bytes directly.

        updating the linked document node/msg file directly would be unexpected, so we remove the link and act as a ByteChunk from then

        Overrides:
        setValue in class ByteChunk