| java.lang.Object com.etymon.pj.object.BaseObject com.etymon.pj.object.PjObject com.etymon.pj.object.PjStream
PjStream | public class PjStream extends PjObject (Code) | | A representation of the PDF stream type.
author: Nassib Nassar |
Constructor Summary | |
public | PjStream(byte[] s) Creates a stream as a wrapper around a byte array. | public | PjStream(PjStreamDictionary d, byte[] s) Creates a stream as a wrapper around a PjStreamDictionary and
byte array. |
Method Summary | |
public PjStream | ascii85Decode() Decode this stream if it is compressed with the Ascii85
algorithm. | public static byte[] | ascii85Decode(byte[] src) | public static byte[] | ascii85Encode(byte[] src) | static char[] | ascii85EncodeWord(long word) | static long | bytesToLong(byte[] b, int offset, int len) | public Object | clone() Returns a deep copy of this object. | public PjStream | flateCompress() Compress this stream with the Flate algorithm if it is not
already compressed. | public PjStream | flateDecompress() Decompresses this stream if it is compressed with the Flate
algorithm. | public byte[] | getBuffer() Returns the byte array used in the representation of this
stream. | public PjStreamDictionary | getStreamDictionary() Returns the PjStreamDictionary used in the representation of this
stream. | public void | renumber(Hashtable map) Renumbers object references within this object. | public void | setLength() Sets the Length field in the stream dictionary to
accurately reflect the length of the stream. | static long | toWord(byte[] b, int offset, int sigDigits) | public long | writePdf(OutputStream os) Writes this PDF stream to a stream in PDF format.
Parameters: os - the stream to write to. |
PjStream | public PjStream(byte[] s)(Code) | | Creates a stream as a wrapper around a byte array.
Parameters: s - the byte array to use for this stream. |
PjStream | public PjStream(PjStreamDictionary d, byte[] s)(Code) | | Creates a stream as a wrapper around a PjStreamDictionary and
byte array.
Parameters: d - the dictionary to use for this stream. Parameters: s - the byte array to use for this stream. |
ascii85Decode | public PjStream ascii85Decode() throws InvalidPdfObjectException(Code) | | Decode this stream if it is compressed with the Ascii85
algorithm.
a cloned, unencoded version of this stream; orthis stream if it is not marked as being compressed withAscii85. exception: InvalidPdfObjectException - if an invalid objecttype is encountered. |
ascii85Decode | public static byte[] ascii85Decode(byte[] src)(Code) | | |
ascii85Encode | public static byte[] ascii85Encode(byte[] src)(Code) | | |
ascii85EncodeWord | static char[] ascii85EncodeWord(long word)(Code) | | |
bytesToLong | static long bytesToLong(byte[] b, int offset, int len)(Code) | | |
flateCompress | public PjStream flateCompress() throws InvalidPdfObjectException(Code) | | Compress this stream with the Flate algorithm if it is not
already compressed.
a cloned, compressed version of this stream; orthis stream if it is already compressed. exception: InvalidPdfObjectException - if an invalid objecttype is encountered. |
flateDecompress | public PjStream flateDecompress() throws InvalidPdfObjectException(Code) | | Decompresses this stream if it is compressed with the Flate
algorithm.
a cloned, uncompressed version of this stream; orthis stream if it is not marked as being compressed withFlate. exception: InvalidPdfObjectException - if an invalid objecttype is encountered. |
getBuffer | public byte[] getBuffer()(Code) | | Returns the byte array used in the representation of this
stream.
the byte array used in the representation of thisstream. |
getStreamDictionary | public PjStreamDictionary getStreamDictionary()(Code) | | Returns the PjStreamDictionary used in the representation of this
stream.
the PjStreamDictionary used in the representation of thisstream. |
renumber | public void renumber(Hashtable map)(Code) | | Renumbers object references within this object. This
method calls itself recursively to comprehensively renumber
all objects contained within this object.
Parameters: map - the table of object number mappings. Eachobject number is looked up by key in the hash table, andthe associated value is assigned as the new object number.The map hash table should consist of PjNumber keys andPjReference values. |
setLength | public void setLength()(Code) | | Sets the Length field in the stream dictionary to
accurately reflect the length of the stream. It is not
normally necessary to call this method, because it gets
called implicitly by methods that output the object in PDF
format.
|
toWord | static long toWord(byte[] b, int offset, int sigDigits)(Code) | | |
writePdf | public long writePdf(OutputStream os) throws IOException(Code) | | Writes this PDF stream to a stream in PDF format.
Parameters: os - the stream to write to. the number of bytes written. exception: IOException - if an I/O error occurs. |
|
|