public class PDFStream
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
PDFStream(byte[] bytes,
int offset,
int len,
java.util.Map aMap)
Creates a new stream by copying the byte array and map
|
PDFStream(byte[] bytes,
java.util.Map aMap)
Creates a new stream from the byte array and map.
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(java.lang.String aName) |
java.lang.Object |
clone()
Standard clone implementation.
|
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.
|
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.Map |
getDictionary()
Returns the stream dictionary.
|
byte[] |
getRawData()
Returns the stream data.
|
int |
indexOfFilter(java.lang.String fName)
Returns the index of a particular filter in the filter chain, or -1 if not found.
|
int |
numFilters()
Returns the total number of filters with which this stream is currently encoded.
|
boolean |
usesFilter(java.lang.String fName)
Tests whether a specifc filter will be needed to decode the stream.
|
public PDFStream(byte[] bytes, java.util.Map aMap)
public PDFStream(byte[] bytes, int offset, int len, java.util.Map aMap)
public byte[] getRawData()
public java.util.Map getDictionary()
public void addFilter(java.lang.String aName)
public boolean usesFilter(java.lang.String fName)
public int indexOfFilter(java.lang.String fName)
public int numFilters()
public byte[] decodeStream()
public byte[] decodeStream(int nfilters)
public static byte[] getBytesDecoded(byte[] bytes, int offset, int length, java.lang.String aFilter, java.util.Map params)
public java.lang.Object clone()
clone
in class java.lang.Object