|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.jpdf.PDFOutput
public class PDFOutput
This class is used to write a PDF document. It acts as a wrapper to a real OutputStream, but is necessary for certain internal PDF structures to be built correctly.
Field Summary | |
---|---|
protected java.io.ByteArrayOutputStream |
baos
This is the OutputStream used to write each object to. |
protected PDFObject |
infoID
This is used to track the /Info object (info) |
protected int |
offset
This is the current position within the stream |
protected java.util.Vector |
offsets
This vector contains offsets of each object |
protected java.io.OutputStream |
os
This is the actual OutputStream used to write to. |
protected PDFObject |
rootID
This is used to track the /Root object (catalog) |
Constructor Summary | |
---|---|
PDFOutput(java.io.OutputStream os)
This creates a PDF OutputStream |
Method Summary | |
---|---|
protected void |
close()
This closes the Stream, writing the xref table |
protected void |
write(PDFObject ob)
This method writes a PDFObject to the stream. |
protected void |
writeblock(int firstid,
java.util.Vector block)
Writes a block of references to the PDF file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.OutputStream os
protected java.io.ByteArrayOutputStream baos
We use a separate stream, because we need to keep track of how many bytes have been written for each object for the xref table to work correctly.
protected int offset
protected java.util.Vector offsets
protected PDFObject rootID
protected PDFObject infoID
Constructor Detail |
---|
public PDFOutput(java.io.OutputStream os) throws java.io.IOException
os
- The output stream to write the PDF file to.
java.io.IOException
Method Detail |
---|
protected void write(PDFObject ob) throws java.io.IOException
ob
- PDFObject Obeject to write
java.io.IOException
- on errorprotected void close() throws java.io.IOException
java.io.IOException
protected void writeblock(int firstid, java.util.Vector block) throws java.io.IOException
firstid
- ID of the first reference in this blockblock
- Vector containing the references in this block
java.io.IOException
- on write error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |