Package org.apache.poi.hsmf.datatypes
Class ByteChunkDeferred
java.lang.Object
org.apache.poi.hsmf.datatypes.Chunk
org.apache.poi.hsmf.datatypes.ByteChunk
org.apache.poi.hsmf.datatypes.ByteChunkDeferred
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)).-
Field Summary
Fields inherited from class org.apache.poi.hsmf.datatypes.Chunk
DEFAULT_NAME_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionByteChunkDeferred(String namePrefix, int chunkId, Types.MAPIType type) Creates a Byte Stream Chunk, with the specified type. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getValue()Get bytes directly.voidreadValue(InputStream value) Reads the value of this chunk using an InputStreamvoidreadValue(DocumentNode node) Links the chunk to a documentvoidsetValue(byte[] value) Set bytes directly.voidwriteValue(OutputStream out) Writes the value of this chunk back out again.Methods inherited from class org.apache.poi.hsmf.datatypes.ByteChunk
getAs7bitString, toStringMethods inherited from class org.apache.poi.hsmf.datatypes.Chunk
getChunkId, getEntryName, getType
-
Constructor Details
-
ByteChunkDeferred
Creates a Byte Stream Chunk, with the specified type.
-
-
Method Details
-
readValue
Links the chunk to a document- Parameters:
node- the document node
-
readValue
Description copied from class:ChunkReads the value of this chunk using an InputStream- Overrides:
readValuein classByteChunk- Throws:
IOException
-
writeValue
Description copied from class:ChunkWrites the value of this chunk back out again.- Overrides:
writeValuein classByteChunk- Throws:
IOException
-
getValue
public byte[] getValue()Get bytes directly. -
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
-