| java.lang.Object org.pdfbox.cos.COSBase org.pdfbox.cos.COSDictionary org.pdfbox.cos.COSStream
All known Subclasses: org.pdfbox.pdmodel.common.COSStreamArray,
COSStream | public class COSStream extends COSDictionary (Code) | | This class represents a stream object in a PDF document.
author: Ben Litchfield version: $Revision: 1.39 $ |
COSStream | public COSStream(RandomAccess storage)(Code) | | Constructor. Creates a new stream with an empty dictionary.
Parameters: storage - The intermediate storage for the stream. |
COSStream | public COSStream(COSDictionary dictionary, RandomAccess storage)(Code) | | Constructor.
Parameters: dictionary - The dictionary that is associated with this stream. Parameters: storage - The intermediate storage for the stream. |
accept | public Object accept(ICOSVisitor visitor) throws COSVisitorException(Code) | | visitor pattern double dispatch method.
Parameters: visitor - The object to notify when visiting this object. any object, depending on the visitor implementation, or null throws: COSVisitorException - If an error occurs while visiting this object. |
createFilteredStream | public OutputStream createFilteredStream() throws IOException(Code) | | This will create a new stream for which filtered byte should be
written to. You probably don't want this but want to use the
createUnfilteredStream, which is used to write raw bytes to.
A stream that can be written to. throws: IOException - If there is an error creating the stream. |
createFilteredStream | public OutputStream createFilteredStream(COSBase expectedLength) throws IOException(Code) | | This will create a new stream for which filtered byte should be
written to. You probably don't want this but want to use the
createUnfilteredStream, which is used to write raw bytes to.
Parameters: expectedLength - An entry where a length is expected. A stream that can be written to. throws: IOException - If there is an error creating the stream. |
createUnfilteredStream | public OutputStream createUnfilteredStream() throws IOException(Code) | | This will create an output stream that can be written to.
An output stream which raw data bytes should be written to. throws: IOException - If there is an error creating the stream. |
getFilteredStream | public InputStream getFilteredStream() throws IOException(Code) | | This will get the stream with all of the filters applied.
the bytes of the physical (endoced) stream throws: IOException - when encoding/decoding causes an exception |
getFilters | public COSBase getFilters()(Code) | | This will return the filters to apply to the byte stream.
The method will return
- null if no filters are to be applied
- a COSName if one filter is to be applied
- a COSArray containing COSNames if multiple filters are to be applied
the COSBase object representing the filters |
getScratchFile | public RandomAccess getScratchFile()(Code) | | This will get the scratch file associated with this stream.
The scratch file where this stream is being stored. |
getStreamTokens | public List getStreamTokens() throws IOException(Code) | | This will get all the tokens in the stream.
All of the tokens in the stream. throws: IOException - If there is an error parsing the stream. |
getUnfilteredStream | public InputStream getUnfilteredStream() throws IOException(Code) | | This will get the logical content stream with none of the filters.
the bytes of the logical (decoded) stream throws: IOException - when encoding/decoding causes an exception |
replaceWithStream | public void replaceWithStream(COSStream stream)(Code) | | This will replace this object with the data from the new object. This
is used to easily maintain referential integrity when changing references
to new objects.
Parameters: stream - The stream that have the new values in it. |
setFilters | public void setFilters(COSBase filters) throws IOException(Code) | | set the filters to be applied to the stream.
Parameters: filters - The filters to set on this stream. throws: IOException - If there is an error clearing the old filters. |
Methods inherited from org.pdfbox.cos.COSDictionary | public Object accept(ICOSVisitor visitor) throws COSVisitorException(Code)(Java Doc) public void addAll(COSDictionary dic)(Code)(Java Doc) public void clear()(Code)(Java Doc) public boolean containsValue(Object value)(Code)(Java Doc) public boolean getBoolean(String key, boolean defaultValue)(Code)(Java Doc) public boolean getBoolean(COSName key, boolean defaultValue)(Code)(Java Doc) public Calendar getDate(String key) throws IOException(Code)(Java Doc) public Calendar getDate(COSName key) throws IOException(Code)(Java Doc) public Calendar getDate(String key, Calendar defaultValue) throws IOException(Code)(Java Doc) public Calendar getDate(COSName key, Calendar defaultValue) throws IOException(Code)(Java Doc) public COSBase getDictionaryObject(String key)(Code)(Java Doc) public COSBase getDictionaryObject(String firstKey, String secondKey)(Code)(Java Doc) public COSBase getDictionaryObject(String[] keyList)(Code)(Java Doc) public COSBase getDictionaryObject(COSName key)(Code)(Java Doc) public Calendar getEmbeddedDate(String embedded, String key) throws IOException(Code)(Java Doc) public Calendar getEmbeddedDate(String embedded, COSName key) throws IOException(Code)(Java Doc) public Calendar getEmbeddedDate(String embedded, String key, Calendar defaultValue) throws IOException(Code)(Java Doc) public Calendar getEmbeddedDate(String embedded, COSName key, Calendar defaultValue) throws IOException(Code)(Java Doc) public int getEmbeddedInt(String embeddedDictionary, String key)(Code)(Java Doc) public int getEmbeddedInt(String embeddedDictionary, COSName key)(Code)(Java Doc) public int getEmbeddedInt(String embeddedDictionary, String key, int defaultValue)(Code)(Java Doc) public int getEmbeddedInt(String embeddedDictionary, COSName key, int defaultValue)(Code)(Java Doc) public String getEmbeddedString(String embedded, String key)(Code)(Java Doc) public String getEmbeddedString(String embedded, COSName key)(Code)(Java Doc) public String getEmbeddedString(String embedded, String key, String defaultValue)(Code)(Java Doc) public String getEmbeddedString(String embedded, COSName key, String defaultValue)(Code)(Java Doc) public float getFloat(String key)(Code)(Java Doc) public float getFloat(COSName key)(Code)(Java Doc) public float getFloat(String key, float defaultValue)(Code)(Java Doc) public float getFloat(COSName key, float defaultValue)(Code)(Java Doc) public int getInt(String key)(Code)(Java Doc) public int getInt(COSName key)(Code)(Java Doc) public int getInt(String[] keyList, int defaultValue)(Code)(Java Doc) public int getInt(String key, int defaultValue)(Code)(Java Doc) public int getInt(COSName key, int defaultValue)(Code)(Java Doc) public COSBase getItem(COSName key)(Code)(Java Doc) public COSName getKeyForValue(Object value)(Code)(Java Doc) public long getLong(String key)(Code)(Java Doc) public long getLong(COSName key)(Code)(Java Doc) public long getLong(String[] keyList, long defaultValue)(Code)(Java Doc) public long getLong(String key, long defaultValue)(Code)(Java Doc) public long getLong(COSName key, long defaultValue)(Code)(Java Doc) public String getNameAsString(String key)(Code)(Java Doc) public String getNameAsString(COSName key)(Code)(Java Doc) public String getNameAsString(String key, String defaultValue)(Code)(Java Doc) public String getNameAsString(COSName key, String defaultValue)(Code)(Java Doc) public COSBase getObjectFromPath(String objPath)(Code)(Java Doc) public String getString(String key)(Code)(Java Doc) public String getString(COSName key)(Code)(Java Doc) public String getString(String key, String defaultValue)(Code)(Java Doc) public String getString(COSName key, String defaultValue)(Code)(Java Doc) public Collection getValues()(Code)(Java Doc) public List keyList()(Code)(Java Doc) public void mergeInto(COSDictionary dic)(Code)(Java Doc) public void removeItem(COSName key)(Code)(Java Doc) public void setBoolean(String key, boolean value)(Code)(Java Doc) public void setBoolean(COSName key, boolean value)(Code)(Java Doc) public void setDate(String key, Calendar date)(Code)(Java Doc) public void setDate(COSName key, Calendar date)(Code)(Java Doc) public void setEmbeddedDate(String embedded, String key, Calendar date)(Code)(Java Doc) public void setEmbeddedDate(String embedded, COSName key, Calendar date)(Code)(Java Doc) public void setEmbeddedInt(String embeddedDictionary, String key, int value)(Code)(Java Doc) public void setEmbeddedInt(String embeddedDictionary, COSName key, int value)(Code)(Java Doc) public void setEmbeddedString(String embedded, String key, String value)(Code)(Java Doc) public void setEmbeddedString(String embedded, COSName key, String value)(Code)(Java Doc) public void setFloat(String key, float value)(Code)(Java Doc) public void setFloat(COSName key, float value)(Code)(Java Doc) public void setInt(String key, int value)(Code)(Java Doc) public void setInt(COSName key, int value)(Code)(Java Doc) public void setItem(COSName key, COSBase value)(Code)(Java Doc) public void setItem(COSName key, COSObjectable value)(Code)(Java Doc) public void setItem(String key, COSObjectable value)(Code)(Java Doc) public void setItem(String key, COSBase value)(Code)(Java Doc) public void setLong(String key, long value)(Code)(Java Doc) public void setLong(COSName key, long value)(Code)(Java Doc) public void setName(String key, String value)(Code)(Java Doc) public void setName(COSName key, String value)(Code)(Java Doc) public void setString(String key, String value)(Code)(Java Doc) public void setString(COSName key, String value)(Code)(Java Doc) public int size()(Code)(Java Doc)
|
|
|