Class PDFStream
java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFStream
- All Implemented Interfaces:
- Cloneable
This class represents a PDF stream object.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidThe dict for a stream may specify multiple filters.clone()Standard clone implementation.static RBCodecCCITTFaxDecodecreateCCITTFaxDecoder(Map params, byte[] bytes, int offset, int len) Utility method to create a CCITTFaxDecoder from the stream's decodeParameters dictionary.byte[]Returns the result of running the data through all the filters.byte[]decodeStream(int nfilters) Returns the result of running the data through the first n filters.byte[]getBytes()Returns the stream bytes.static byte[]getBytesDecoded(byte[] bytes, int offset, int length, String aFilter, Map params) Returns the result of runnning the bytes through a particular filter (/FlateDecode, /LZW, /ASCII85Decode, etc.).Returns the stream dictionary.getFilterParameters(String name) Returns the filter parameters for a particular filterintindexOfFilter(String fName) Returns the index of a particular filter in the filter chain, or -1 if not found.intReturns the total number of filters with which this stream is currently encoded.booleanusesFilter(String fName) Tests whether a specific filter will be needed to decode the stream.
- 
Constructor Details- 
PDFStreamCreates a new stream from the byte array and map.
- 
PDFStreamCreates a new stream by copying the byte array and map.
 
- 
- 
Method Details- 
getBytespublic byte[] getBytes()Returns the stream bytes.
- 
getDictionaryReturns the stream dictionary.
- 
addFilterThe dict for a stream may specify multiple filters. The "Filter" property is either a single filter name or an array of filter names. If it's an array, the PDF reader will apply the filters in the order they appear. Call this method with the name of the filter after applying the encoding to the data.
- 
usesFilterTests whether a specific filter will be needed to decode the stream.
- 
indexOfFilterReturns the index of a particular filter in the filter chain, or -1 if not found.
- 
numFilterspublic int numFilters()Returns the total number of filters with which this stream is currently encoded.
- 
getFilterParametersReturns the filter parameters for a particular filter
- 
decodeStreampublic byte[] decodeStream()Returns the result of running the data through all the filters.
- 
decodeStreampublic byte[] decodeStream(int nfilters) Returns the result of running the data through the first n filters.
- 
getBytesDecodedpublic static byte[] getBytesDecoded(byte[] bytes, int offset, int length, String aFilter, Map params) Returns the result of runnning the bytes through a particular filter (/FlateDecode, /LZW, /ASCII85Decode, etc.).
- 
cloneStandard clone implementation.
- 
createCCITTFaxDecoderpublic static RBCodecCCITTFaxDecode createCCITTFaxDecoder(Map params, byte[] bytes, int offset, int len) Utility method to create a CCITTFaxDecoder from the stream's decodeParameters dictionary.
 
-