multivalent.std.adaptor.pdf

Class InputStreamComposite

public class InputStreamComposite extends InputStream

Merges possibly multiple component java.io.InputStreams, possibly with encodings such as Flate and ASCIIHex, possibly with a Predictor (on LZW or Flate), possibly encrypted. Does not expand out image-specific filters (DCT, FAX, JBIG2). Allows one character of InputStreamComposite and peek.

Version: $Revision: 1.26 $ $Date: 2003/10/19 14:46:01 $

See Also: DecodeASCII85 DecodeASCIIHex DecodeRunLength InputStreamLZW java.util.zip.InflaterInputStream DecodePredictor

Constructor Summary
InputStreamComposite(Object obj, boolean iscontent, PDFReader pdfr)
Returns stream of buffered, decrypted, uncompressed data; image filters not processed.
Method Summary
intavailable()
voidclose()
voidmark(int readlimit)
booleanmarkSupported()
If no filter, true; else false.
intpeek()
Returns next character without advancing file position pointer, so that next peek() or read() returns same character at same position.
intread()
intread(byte[] b, int off, int len)
voidreset()
longskip(long n)
voidunread(int c)
Pushes back one character of stream, so that the next read() will return it.

Constructor Detail

InputStreamComposite

public InputStreamComposite(Object obj, boolean iscontent, PDFReader pdfr)
Returns stream of buffered, decrypted, uncompressed data; image filters not processed. Referenced stream dictionary (via IRef, Object[], or direct Dict) can supply inline data by setting STREAM_DATA key with byte[].

Parameters: ref can be CLASS_DICTIONARY for stream with filters, IRef to stream or array or streams, Object[] of IRef's to stream, or CLASS_DATA for final data requiring no filters. iscontent declare whether stream corresponds to page contents, and if so insert extra space between each pair of substreams, to handle corner case where concatenated streams don't have such space and would concatenate commands or arguments.

Method Detail

available

public int available()

close

public void close()

mark

public void mark(int readlimit)

markSupported

public boolean markSupported()
If no filter, true; else false.

peek

public int peek()
Returns next character without advancing file position pointer, so that next peek() or read() returns same character at same position. Side effect: pushback character is set.

read

public int read()

read

public int read(byte[] b, int off, int len)

reset

public void reset()

skip

public long skip(long n)

unread

public void unread(int c)
Pushes back one character of stream, so that the next read() will return it.