|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.util.LZWDecompresser
org.apache.poi.hmef.CompressedRTF
public final class CompressedRTF
Within a HMEFMessage, the content is often
stored in as RTF, but LZW compressed. This class
handles decompressing it for you.
| Field Summary | |
|---|---|
static byte[] |
COMPRESSED_SIGNATURE
|
static int |
COMPRESSED_SIGNATURE_INT
|
static java.lang.String |
LZW_RTF_PRELOAD
|
static byte[] |
UNCOMPRESSED_SIGNATURE
|
static int |
UNCOMPRESSED_SIGNATURE_INT
|
| Constructor Summary | |
|---|---|
CompressedRTF()
|
|
| Method Summary | |
|---|---|
protected int |
adjustDictionaryOffset(int offset)
We use regular dictionary offsets, so no need to change anything |
void |
decompress(java.io.InputStream src,
java.io.OutputStream res)
Decompresses the whole of the compressed RTF stream, outputting the resulting RTF bytes. |
int |
getCompressedSize()
Returns how big the compressed version was. |
int |
getDeCompressedSize()
Returns how big the decompressed version was. |
protected int |
populateDictionary(byte[] dict)
Populates the dictionary, and returns where in it to begin writing new codes. |
| Methods inherited from class org.apache.poi.util.LZWDecompresser |
|---|
decompress, fromByte, fromInt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte[] COMPRESSED_SIGNATURE
public static final byte[] UNCOMPRESSED_SIGNATURE
public static final int COMPRESSED_SIGNATURE_INT
public static final int UNCOMPRESSED_SIGNATURE_INT
public static final java.lang.String LZW_RTF_PRELOAD
| Constructor Detail |
|---|
public CompressedRTF()
| Method Detail |
|---|
public void decompress(java.io.InputStream src,
java.io.OutputStream res)
throws java.io.IOException
getDeCompressedSize()
if you need to know how much of the result is
real. (Padding may be up to 7 bytes).
decompress in class LZWDecompresserjava.io.IOExceptionpublic int getCompressedSize()
public int getDeCompressedSize()
protected int adjustDictionaryOffset(int offset)
adjustDictionaryOffset in class LZWDecompresserprotected int populateDictionary(byte[] dict)
LZWDecompresser
populateDictionary in class LZWDecompresser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||