org.apache.fop.pdf
Class PDFName
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFName
- All Implemented Interfaces:
- PDFWritable
public class PDFName
- extends PDFObject
Class representing a PDF name object.
Constructor Summary |
PDFName(java.lang.String name)
Creates a new PDF name object. |
Method Summary |
protected int |
output(java.io.OutputStream stream)
Write the PDF represention of this object |
void |
outputInline(java.io.OutputStream out,
java.io.Writer writer)
Writes a "direct object" (inline object) representation to the stream. |
java.lang.String |
toString()
|
Methods inherited from class org.apache.fop.pdf.PDFObject |
encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PDFName
public PDFName(java.lang.String name)
- Creates a new PDF name object.
- Parameters:
name
- the name value
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object
output
protected int output(java.io.OutputStream stream)
throws java.io.IOException
- Write the PDF represention of this object
- Overrides:
output
in class PDFObject
- Parameters:
stream
- the stream to write the PDF to
- Returns:
- the number of bytes written
- Throws:
java.io.IOException
- if there is an error writing to the stream
outputInline
public void outputInline(java.io.OutputStream out,
java.io.Writer writer)
throws java.io.IOException
- Writes a "direct object" (inline object) representation to the stream. A Writer is given
for optimized encoding of text content. Since the Writer is buffered, make sure
flush()
is called before any direct calls to out
are made.
- Specified by:
outputInline
in interface PDFWritable
- Overrides:
outputInline
in class PDFObject
- Parameters:
out
- the OutputStream (for binary content)writer
- the Writer (for text content, wraps the above OutputStream)
- Throws:
java.io.IOException
- if an I/O error occurs
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.