|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.pdf.PDFObject
org.apache.fop.pdf.AbstractPDFStream
public abstract class AbstractPDFStream
This is an abstract base class for PDF streams.
| Field Summary |
|---|
| Fields inherited from class org.apache.fop.pdf.PDFObject |
|---|
log |
| Constructor Summary | |
|---|---|
protected |
AbstractPDFStream()
|
protected |
AbstractPDFStream(boolean encodeOnTheFly)
|
protected |
AbstractPDFStream(PDFDictionary dictionary)
|
protected |
AbstractPDFStream(PDFDictionary dictionary,
boolean encodeOnTheFly)
|
| Method Summary | |
|---|---|
protected int |
encodeAndWriteStream(java.io.OutputStream out,
PDFNumber refLength)
Encodes and writes a stream directly to an OutputStream. |
protected StreamCache |
encodeStream()
Encodes the raw data stream for output to a PDF file. |
protected java.lang.Object |
get(java.lang.String key)
|
protected java.lang.String |
getDefaultFilterName()
Returns the name of a suitable filter for this PDF object. |
protected PDFDictionary |
getDictionary()
|
PDFFilterList |
getFilterList()
Returns the associated filter list. |
protected abstract int |
getSizeHint()
Returns a value that hints at the size of the encoded stream. |
protected boolean |
multipleFiltersAllowed()
Whether multiple filters can be applied. |
int |
output(java.io.OutputStream stream)
Overload the base object method so we don't have to copy byte arrays around so much Write the PDF represention of this object |
protected abstract void |
outputRawStreamData(java.io.OutputStream out)
Sends the raw stream data to the target OutputStream. |
protected int |
outputStreamData(StreamCache encodedStream,
java.io.OutputStream out)
Output just the stream data enclosed by stream/endstream markers |
protected void |
populateStreamDict(java.lang.Object lengthEntry)
Populates the dictionary with all necessary entries for the stream. |
protected void |
prepareImplicitFilters()
Prepares implicit filters (such as the DCTFilter for JPEG images). |
void |
put(java.lang.String key,
java.lang.Object value)
Puts the given object in the dictionary associated to this stream. |
void |
setDocument(PDFDocument doc)
Sets the parent PDFDocument. |
protected void |
setupFilterList()
Sets up the default filters for this stream if they haven't been set from outside. |
| Methods inherited from class org.apache.fop.pdf.PDFObject |
|---|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setObjectNumber, setParent, toPDF, toPDFString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractPDFStream()
protected AbstractPDFStream(PDFDictionary dictionary)
protected AbstractPDFStream(boolean encodeOnTheFly)
protected AbstractPDFStream(PDFDictionary dictionary,
boolean encodeOnTheFly)
| Method Detail |
|---|
protected final PDFDictionary getDictionary()
protected java.lang.Object get(java.lang.String key)
public void put(java.lang.String key,
java.lang.Object value)
key - the key in the dictionaryvalue - the value to storeprotected void setupFilterList()
protected java.lang.String getDefaultFilterName()
PDFFilterListpublic PDFFilterList getFilterList()
protected abstract int getSizeHint()
throws java.io.IOException
java.io.IOException - in case of an I/O problem
protected abstract void outputRawStreamData(java.io.OutputStream out)
throws java.io.IOException
out - OutputStream to write to
java.io.IOException - In case of an I/O problem
protected int outputStreamData(StreamCache encodedStream,
java.io.OutputStream out)
throws java.io.IOException
encodedStream - already encoded/filtered stream to writeout - OutputStream to write to
java.io.IOException - in case of an I/O problem
protected StreamCache encodeStream()
throws java.io.IOException
java.io.IOException - in case of an I/O problem
protected int encodeAndWriteStream(java.io.OutputStream out,
PDFNumber refLength)
throws java.io.IOException
out - OutputStream to write torefLength - PDFNumber object to receive the stream length
java.io.IOException - in case of an I/O problem
public int output(java.io.OutputStream stream)
throws java.io.IOException
output in class PDFObjectstream - the stream to write the PDF to
java.io.IOException - if there is an error writing to the streampublic void setDocument(PDFDocument doc)
PDFObject
setDocument in class PDFObjectdoc - the PDFDocument.protected void populateStreamDict(java.lang.Object lengthEntry)
lengthEntry - value for the /Length entryprotected void prepareImplicitFilters()
protected boolean multipleFiltersAllowed()
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||