Package org.apache.poi.hmef
Class CompressedRTF
- java.lang.Object
-
- org.apache.poi.util.LZWDecompresser
-
- org.apache.poi.hmef.CompressedRTF
-
public final class CompressedRTF extends LZWDecompresser
Within aHMEFMessage, the content is often stored in as RTF, but LZW compressed. This class handles decompressing it for you.
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMPRESSED_SIGNATURE_INTstatic java.lang.StringLZW_RTF_PRELOADstatic intUNCOMPRESSED_SIGNATURE_INT
-
Constructor Summary
Constructors Constructor Description CompressedRTF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecompress(java.io.InputStream src, java.io.OutputStream res)Decompresses the whole of the compressed RTF stream, outputting the resulting RTF bytes.intgetCompressedSize()Returns how big the compressed version was.intgetDeCompressedSize()Returns how big the decompressed version was.-
Methods inherited from class org.apache.poi.util.LZWDecompresser
decompress, fromByte, fromInt
-
-
-
-
Field Detail
-
COMPRESSED_SIGNATURE_INT
public static final int COMPRESSED_SIGNATURE_INT
-
UNCOMPRESSED_SIGNATURE_INT
public static final int UNCOMPRESSED_SIGNATURE_INT
-
LZW_RTF_PRELOAD
public static final java.lang.String LZW_RTF_PRELOAD
- See Also:
- Constant Field Values
-
-
Method Detail
-
decompress
public void decompress(java.io.InputStream src, java.io.OutputStream res) throws java.io.IOExceptionDecompresses the whole of the compressed RTF stream, outputting the resulting RTF bytes. Note - will decompress any padding at the end of the input, if present, usegetDeCompressedSize()if you need to know how much of the result is real. (Padding may be up to 7 bytes).- Overrides:
decompressin classLZWDecompresser- Throws:
java.io.IOException
-
getCompressedSize
public int getCompressedSize()
Returns how big the compressed version was.
-
getDeCompressedSize
public int getDeCompressedSize()
Returns how big the decompressed version was.
-
-