public abstract class AbstractPDFStream extends PDFDictionary
entries, order
DATE_FORMAT, log
Constructor and Description |
---|
AbstractPDFStream()
Constructor for AbstractPDFStream.
|
Modifier and Type | Method and Description |
---|---|
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.String |
getDefaultFilterName()
Returns the name of a suitable filter for this PDF object.
|
PDFFilterList |
getFilterList()
Returns the associated filter list.
|
protected abstract int |
getSizeHint()
Returns a value that hints at the size of the encoded stream.
|
protected 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).
|
protected void |
setupFilterList()
Sets up the default filters for this stream if they haven't been set
from outside.
|
get, put, put, writeDictionary
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString
protected void setupFilterList()
protected java.lang.String getDefaultFilterName()
PDFFilterList
public PDFFilterList getFilterList()
protected abstract int getSizeHint() throws java.io.IOException
java.io.IOException
- in case of an I/O problemprotected abstract void outputRawStreamData(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream to write tojava.io.IOException
- In case of an I/O problemprotected int outputStreamData(StreamCache encodedStream, java.io.OutputStream out) throws java.io.IOException
encodedStream
- already encoded/filtered stream to writeout
- OutputStream to write tojava.io.IOException
- in case of an I/O problemprotected StreamCache encodeStream() throws java.io.IOException
java.io.IOException
- in case of an I/O problemprotected int encodeAndWriteStream(java.io.OutputStream out, PDFNumber refLength) throws java.io.IOException
out
- OutputStream to write torefLength
- PDFNumber object to receive the stream lengthjava.io.IOException
- in case of an I/O problemprotected int output(java.io.OutputStream stream) throws java.io.IOException
output
in class PDFDictionary
stream
- the stream to write the PDF tojava.io.IOException
- if there is an error writing to the streamprotected void populateStreamDict(java.lang.Object lengthEntry)
lengthEntry
- value for the /Length entryprotected void prepareImplicitFilters()
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.