| java.lang.Object com.lowagie.text.pdf.PdfObject com.lowagie.text.pdf.PdfDictionary com.lowagie.text.pdf.PdfStream
All known Subclasses: com.lowagie.text.pdf.PdfICCBased, com.lowagie.text.pdf.PdfImage, com.lowagie.text.pdf.PRStream, com.lowagie.text.pdf.PdfPattern, com.lowagie.text.pdf.PdfFormXObject, com.lowagie.text.pdf.PdfContents,
PdfStream | public class PdfStream extends PdfDictionary (Code) | | PdfStream is the Pdf stream object.
A stream, like a string, is a sequence of characters. However, an application can
read a small portion of a stream at a time, while a string must be read in its entirety.
For this reason, objects with potentially large amounts of data, such as images and
page descriptions, are represented as streams.
A stream consists of a dictionary that describes a sequence of characters, followed by
the keyword stream, followed by zero or more lines of characters, followed by
the keyword endstream.
All streams must be PdfIndirectObject s. The stream dictionary must be a direct
object. The keyword stream that follows the stream dictionary should be followed by
a carriage return and linefeed or just a linefeed.
Remark: In this version only the FLATEDECODE-filter is supported.
This object is described in the 'Portable Document Format Reference Manual version 1.7'
section 3.2.7 (page 60-63).
See Also: PdfObject See Also: PdfDictionary |
ENDSTREAM | final static byte ENDSTREAM(Code) | | |
SIZESTREAM | final static int SIZESTREAM(Code) | | |
STARTSTREAM | final static byte STARTSTREAM(Code) | | |
compressed | protected boolean compressed(Code) | | is the stream compressed?
|
inputStreamLength | protected int inputStreamLength(Code) | | |
rawLength | protected int rawLength(Code) | | |
PdfStream | public PdfStream(byte[] bytes)(Code) | | Constructs a PdfStream -object.
Parameters: bytes - content of the new PdfObject as an array of byte . |
PdfStream | public PdfStream(InputStream inputStream, PdfWriter writer)(Code) | | Creates an efficient stream. No temporary array is ever created. The InputStream
is totally consumed but is not closed. The general usage is:
InputStream in = ...;
PdfStream stream = new PdfStream(in, writer);
stream.flateCompress();
writer.addToBody(stream);
stream.writeLength();
in.close();
Parameters: inputStream - the data to write to this stream Parameters: writer - the PdfWriter for this stream |
PdfStream | protected PdfStream()(Code) | | Constructs a PdfStream -object.
|
flateCompress | public void flateCompress()(Code) | | Compresses the stream.
|
getRawLength | public int getRawLength()(Code) | | Gets the raw length of the stream.
the raw length of the stream |
|
|