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 Details

    • ByteChunkDeferred

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

    • readValue

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

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

      public void writeValue(OutputStream out) throws IOException
      Description copied from class: Chunk
      Writes the value of this chunk back out again.
      Overrides:
      writeValue in class ByteChunk
      Throws:
      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