Package com.ribs.pdf
Class PDFStream
java.lang.Object
com.ribs.pdf.PDFStream
- All Implemented Interfaces:
Cloneable
This class represents a PDF stream object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clone()
Standard clone implementation.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.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.byte[]
Returns the stream data.int
indexOfFilter
(String fName) Returns the index of a particular filter in the filter chain, or -1 if not found.int
Returns the total number of filters with which this stream is currently encoded.boolean
usesFilter
(String fName) Tests whether a specifc filter will be needed to decode the stream.
-
Constructor Details
-
PDFStream
Creates a new stream from the byte array and map. -
PDFStream
Creates a new stream by copying the byte array and map
-
-
Method Details
-
getRawData
public byte[] getRawData()Returns the stream data. -
getDictionary
Returns the stream dictionary. -
addFilter
-
usesFilter
Tests whether a specifc filter will be needed to decode the stream. -
indexOfFilter
Returns the index of a particular filter in the filter chain, or -1 if not found. -
numFilters
public int numFilters()Returns the total number of filters with which this stream is currently encoded. -
decodeStream
public byte[] decodeStream()Returns the result of running the data through all the filters. -
decodeStream
public byte[] decodeStream(int nfilters) Returns the result of running the data through the first n filters. -
getBytesDecoded
public 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.). -
clone
Standard clone implementation.
-