|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.jpdf.PDFObject
public abstract class PDFObject
This is the base class for all Objects that form the PDF document.
Field Summary | |
---|---|
protected int |
objser
This is the unique serial number for this object. |
protected PDFDocument |
pdfDocument
This allows any PDF object to refer to the document being constructed. |
Constructor Summary | |
---|---|
PDFObject(java.lang.String type)
This is usually called by extensors to this class, and sets the PDF Object Type |
Method Summary | |
---|---|
PDFDocument |
getPDFDocument()
Returns the PDF document this object belongs to. |
int |
getSerialID()
Returns the unique serial number of this object. |
java.lang.String |
getType()
Returns the PDF Type of this object |
static java.lang.String |
toArray(java.util.Vector v)
This utility method returns a String containing an array definition based on a Vector containing PDFObjects |
java.lang.String |
toString()
Returns the unique serial number in PDF format |
abstract void |
write(java.io.OutputStream os)
Writes the object to the output stream. |
void |
writeEnd(java.io.OutputStream os)
The write method should call this after writing anything to the OutputStream. |
void |
writeStart(java.io.OutputStream os)
The write method should call this before writing anything to the OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int objser
protected PDFDocument pdfDocument
Constructor Detail |
---|
public PDFObject(java.lang.String type)
Method Detail |
---|
public java.lang.String getType()
public final int getSerialID()
public final PDFDocument getPDFDocument()
public abstract void write(java.io.OutputStream os) throws java.io.IOException
Writes the object to the output stream. This method must be overidden.
Note: It should not write any other objects, even if they are it's Kids, as they will be written by the calling routine.
os
- OutputStream to send the object to
java.io.IOException
- on errorpublic final void writeStart(java.io.OutputStream os) throws java.io.IOException
Note: There are a few rare cases where this method is not called.
os
- OutputStream to write to
java.io.IOException
- on errorpublic final void writeEnd(java.io.OutputStream os) throws java.io.IOException
Note: There are a few rare cases where this method is not called.
os
- OutputStream to write to
java.io.IOException
- on errorpublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toArray(java.util.Vector v)
v
- Vector containing PDFObjects
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |