Package org.apache.poi.hsmf.datatypes
Class StringChunk
java.lang.Object
org.apache.poi.hsmf.datatypes.Chunk
org.apache.poi.hsmf.datatypes.StringChunk
A Chunk made up of a single string.
-
Field Summary
Fields inherited from class org.apache.poi.hsmf.datatypes.Chunk
DEFAULT_NAME_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionStringChunk(int chunkId, Types.MAPIType type) Create a String Chunk, with the specified type.StringChunk(String namePrefix, int chunkId, Types.MAPIType type) Creates a String Chunk. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Encoding that will be used to decode any "7 bit" (non unicode) data.byte[]getValue()Returns the Text value of the chunkprotected static StringparseAs7BitData(byte[] data) Parses as non-unicode, supposedly 7 bit CP1252 data and returns the string that that yields.protected static StringparseAs7BitData(byte[] data, String encoding) Parses as non-unicode, supposedly 7 bit data and returns the string that that yields.voidreadValue(InputStream value) Reads the value of this chunk using an InputStreamvoidset7BitEncoding(String encoding) Sets the Encoding that will be used to decode any "7 bit" (non unicode) data.voidtoString()voidwriteValue(OutputStream out) Writes the value of this chunk back out again.Methods inherited from class org.apache.poi.hsmf.datatypes.Chunk
getChunkId, getEntryName, getType
-
Constructor Details
-
StringChunk
Creates a String Chunk. -
StringChunk
Create a String Chunk, with the specified type.
-
-
Method Details
-
get7BitEncoding
Returns the Encoding that will be used to decode any "7 bit" (non unicode) data. Most files default to CP1252 -
set7BitEncoding
Sets the Encoding that will be used to decode any "7 bit" (non unicode) data. This doesn't appear to be stored anywhere specific in the file, so you may need to guess by looking at headers etc -
readValue
Description copied from class:ChunkReads the value of this chunk using an InputStream- Specified by:
readValuein classChunk- Throws:
IOException
-
writeValue
Description copied from class:ChunkWrites the value of this chunk back out again.- Specified by:
writeValuein classChunk- Throws:
IOException
-
getValue
Returns the Text value of the chunk -
getRawValue
public byte[] getRawValue() -
setValue
-
toString
-
parseAs7BitData
Parses as non-unicode, supposedly 7 bit CP1252 data and returns the string that that yields. -
parseAs7BitData
Parses as non-unicode, supposedly 7 bit data and returns the string that that yields.
-