Main Page | Namespace List | Class Hierarchy | Class List | Class Members | Related Pages

gnu::jpdf::PDFStream Class Reference

Inheritance diagram for gnu::jpdf::PDFStream:

Inheritance graph
[legend]
Collaboration diagram for gnu::jpdf::PDFStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PDFStream ()
 PDFStream (String type)
void setDeflate (boolean mode)
boolean getDeflate ()
OutputStream getOutputStream ()
PrintWriter getWriter ()
ByteArrayOutputStream getStream ()
void write (OutputStream os) throws IOException
void writeStream (OutputStream os) throws IOException

Package Attributes

transient ByteArrayOutputStream buf
boolean deflate

Detailed Description

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/

Eric Z. Beard, ericzbeard@hotmail.com

Author
ezb
Version:
Revision
1.1.1.1
,
Date
2001/10/29 19:51:08


Constructor & Destructor Documentation

gnu::jpdf::PDFStream::PDFStream  )  [inline]
 

Constructs a plain stream.

By default, the stream will be compressed.

gnu::jpdf::PDFStream::PDFStream String  type  )  [inline]
 

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


Member Function Documentation

boolean gnu::jpdf::PDFStream::getDeflate  )  [inline]
 

Returs true if the stream will be compressed.

Returns:
true if compression is enabled

OutputStream gnu::jpdf::PDFStream::getOutputStream  )  [inline]
 

Returns the OutputStream that will append to this stream.

Returns:
The stream for this object

ByteArrayOutputStream gnu::jpdf::PDFStream::getStream  )  [inline]
 

This is for extenders, and provides access to the stream.

Returns:
ByteArrayOutputStream containing the contents.

PrintWriter gnu::jpdf::PDFStream::getWriter  )  [inline]
 

Creates a PrintWriter that will append to this stream.

Returns:
a PrintWriter to write to the stream

void gnu::jpdf::PDFStream::setDeflate boolean  mode  )  [inline]
 

Parameters:
mode true will FlatDecode the stream

void gnu::jpdf::PDFStream::write OutputStream  os  )  throws IOException [inline, virtual]
 

Parameters:
os OutputStream to send the object to
Exceptions:
IOException on error

Implements gnu::jpdf::PDFObject.

Reimplemented in gnu::jpdf::PDFImage.

void gnu::jpdf::PDFStream::writeStream OutputStream  os  )  throws IOException [inline]
 

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
Exceptions:
IOException on error

Reimplemented in gnu::jpdf::PDFImage.


Member Data Documentation

transient ByteArrayOutputStream gnu::jpdf::PDFStream::buf [package]
 

This holds the stream's content.

boolean gnu::jpdf::PDFStream::deflate [package]
 

True if we will compress the stream in the pdf file


The documentation for this class was generated from the following file:
Generated on Wed Jan 19 16:58:08 2005 by  doxygen 1.3.9.1