Class PDFStream
- java.lang.Object
- 
- com.inductiveautomation.rm.pdf.reader.PDFStream
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class PDFStream extends java.lang.Object implements java.lang.CloneableThis class represents a PDF stream object.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(java.lang.String aName)The dict for a stream may specify multiple filters.java.lang.Objectclone()Standard clone implementation.static RBCodecCCITTFaxDecodecreateCCITTFaxDecoder(java.util.Map params, byte[] bytes, int offset, int len)Utility method to create a CCITTFaxDecoder from the stream's decodeParameters dictionary.byte[]decodeStream()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, java.lang.String aFilter, java.util.Map params)Returns the result of runnning the bytes through a particular filter (/FlateDecode, /LZW, /ASCII85Decode, etc.).java.util.MapgetDictionary()Returns the stream dictionary.java.util.MapgetFilterParameters(java.lang.String name)Returns the filter parameters for a particular filterintindexOfFilter(java.lang.String fName)Returns the index of a particular filter in the filter chain, or -1 if not found.intnumFilters()Returns the total number of filters with which this stream is currently encoded.booleanusesFilter(java.lang.String fName)Tests whether a specific filter will be needed to decode the stream.
 
- 
- 
- 
Method Detail- 
getBytespublic byte[] getBytes() Returns the stream bytes.
 - 
getDictionarypublic java.util.Map getDictionary() Returns the stream dictionary.
 - 
addFilterpublic void addFilter(java.lang.String aName) The 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.
 - 
usesFilterpublic boolean usesFilter(java.lang.String fName) Tests whether a specific filter will be needed to decode the stream.
 - 
indexOfFilterpublic int indexOfFilter(java.lang.String fName) Returns 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.
 - 
getFilterParameterspublic java.util.Map getFilterParameters(java.lang.String name) Returns 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, java.lang.String aFilter, java.util.Map params)Returns the result of runnning the bytes through a particular filter (/FlateDecode, /LZW, /ASCII85Decode, etc.).
 - 
clonepublic java.lang.Object clone() Standard clone implementation.- Overrides:
- clonein class- java.lang.Object
 
 - 
createCCITTFaxDecoderpublic static RBCodecCCITTFaxDecode createCCITTFaxDecoder(java.util.Map params, byte[] bytes, int offset, int len) Utility method to create a CCITTFaxDecoder from the stream's decodeParameters dictionary.
 
- 
 
-