| java.lang.Object gnu.jpdf.PDFObject gnu.jpdf.PDFStream
All known Subclasses: gnu.jpdf.PDFImage,
PDFStream | public class PDFStream extends PDFObject implements Serializable(Code) | | This class implements a PDF stream object. In PDF, streams contain data
like the graphic operators that render a page, or the pixels of an image.
In PDF, a stream can be compressed using several different methods, or
left uncompressed. Here we support both uncompressed, and FlateDecode as
it's supported by the java core.
author: Peter T Mount http://www.retep.org.uk/pdf/ author: Eric Z. Beard, ericzbeard@hotmail.com author: $Author: ezb $ version: $Revision: 1.1.1.1 $, $Date: 2001/10/29 19:51:08 $ |
deflate | boolean deflate(Code) | | True if we will compress the stream in the pdf file
|
PDFStream | public PDFStream()(Code) | | Constructs a plain stream.
By default, the stream will be compressed.
|
PDFStream | public PDFStream(String type)(Code) | | Constructs a stream. The supplied type is stored in the stream's header
and is used by other objects that extend the PDFStream class (like
PDFImage).
By default, the stream will be compressed.
Parameters: type - type for the stream See Also: PDFImage |
getDeflate | public boolean getDeflate()(Code) | | Returs true if the stream will be compressed.
true if compression is enabled |
getOutputStream | public OutputStream getOutputStream()(Code) | | Returns the OutputStream that will append to this stream.
The stream for this object |
getStream | public ByteArrayOutputStream getStream()(Code) | | This is for extenders, and provides access to the stream.
ByteArrayOutputStream containing the contents. |
getWriter | public PrintWriter getWriter()(Code) | | Creates a PrintWriter that will append to this stream.
a PrintWriter to write to the stream |
setDeflate | public void setDeflate(boolean mode)(Code) | | Parameters: mode - true will FlatDecode the stream |
writeStream | public void writeStream(OutputStream os) throws IOException(Code) | | This inserts the Streams length, then the actual stream, finally
the end of stream/object markers.
This is intended for anyone extending PDFStream, as objects
containing streams do no use writeEnd(), and they must be able
to write the actual stream.
Parameters: os - OutputStream to send the object to exception: IOException - on error |
|
|