java.io.Closeable, java.lang.AutoCloseable, COSObjectableCOSStreamArraypublic class COSStream extends COSDictionary implements java.io.Closeable
items| Constructor | Description |
|---|---|
COSStream(COSDictionary dictionary,
RandomAccess storage) |
Constructor.
|
COSStream(RandomAccess storage) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
accept(ICOSVisitor visitor) |
visitor pattern double dispatch method.
|
void |
close() |
|
java.io.OutputStream |
createFilteredStream() |
This will create a new stream for which filtered byte should be
written to.
|
java.io.OutputStream |
createFilteredStream(COSBase expectedLength) |
This will create a new stream for which filtered byte should be
written to.
|
java.io.OutputStream |
createUnfilteredStream() |
This will create an output stream that can be written to.
|
long |
getFilteredLength() |
This will get the length of the encoded stream.
|
long |
getFilteredLengthWritten() |
This will get the length of the data written in the encoded stream.
|
java.io.InputStream |
getFilteredStream() |
This will get the stream with all of the filters applied.
|
COSBase |
getFilters() |
This will return the filters to apply to the byte stream.
|
RandomAccess |
getScratchFile() |
Deprecated.
the direct access to the scratch file will be removed.
|
java.util.List<java.lang.Object> |
getStreamTokens() |
This will get all the tokens in the stream.
|
java.io.InputStream |
getUnfilteredStream() |
This will get the logical content stream with none of the filters.
|
void |
replaceWithStream(COSStream stream) |
Deprecated.
will be removed
|
void |
setFilteredLength(long length) |
This will set the expected length of the encoded stream.
|
void |
setFilters(COSBase filters) |
set the filters to be applied to the stream.
|
getCOSObject, getFilterManager, isDirect, isNeedToBeUpdate, setDirect, setNeedToBeUpdateaddAll, clear, containsKey, containsKey, containsValue, entrySet, getBoolean, getBoolean, getBoolean, getDate, getDate, getDate, getDate, getDictionaryObject, getDictionaryObject, getDictionaryObject, getDictionaryObject, getDictionaryObject, getEmbeddedDate, getEmbeddedDate, getEmbeddedDate, getEmbeddedDate, getEmbeddedInt, getEmbeddedInt, getEmbeddedInt, getEmbeddedInt, getEmbeddedString, getEmbeddedString, getEmbeddedString, getEmbeddedString, getFloat, getFloat, getFloat, getFloat, getInt, getInt, getInt, getInt, getInt, getInt, getInt, getItem, getItem, getKeyForValue, getLong, getLong, getLong, getLong, getLong, getNameAsString, getNameAsString, getNameAsString, getNameAsString, getObjectFromPath, getString, getString, getString, getString, getValues, keyList, keySet, mergeInto, removeItem, setBoolean, setBoolean, setDate, setDate, setEmbeddedDate, setEmbeddedDate, setEmbeddedInt, setEmbeddedInt, setEmbeddedString, setEmbeddedString, setFloat, setFloat, setInt, setInt, setItem, setItem, setItem, setItem, setLong, setLong, setName, setName, setString, setString, size, toStringpublic COSStream(RandomAccess storage)
storage - The intermediate storage for the stream.public COSStream(COSDictionary dictionary, RandomAccess storage)
dictionary - The dictionary that is associated with this stream.storage - The intermediate storage for the stream.public void replaceWithStream(COSStream stream)
stream - The stream that have the new values in it.public RandomAccess getScratchFile()
public java.util.List<java.lang.Object> getStreamTokens()
throws java.io.IOException
java.io.IOException - If there is an error parsing the stream.public java.io.InputStream getFilteredStream()
throws java.io.IOException
java.io.IOException - when encoding/decoding causes an exceptionpublic long getFilteredLength()
throws java.io.IOException
java.io.IOExceptionpublic void setFilteredLength(long length)
length - the expected length of the encoded stream.public long getFilteredLengthWritten()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getUnfilteredStream()
throws java.io.IOException
java.io.IOException - when encoding/decoding causes an exceptionpublic java.lang.Object accept(ICOSVisitor visitor) throws COSVisitorException
accept in class COSDictionaryvisitor - The object to notify when visiting this object.COSVisitorException - If an error occurs while visiting this object.public COSBase getFilters()
public java.io.OutputStream createFilteredStream()
throws java.io.IOException
java.io.IOException - If there is an error creating the stream.public java.io.OutputStream createFilteredStream(COSBase expectedLength) throws java.io.IOException
expectedLength - An entry where a length is expected.java.io.IOException - If there is an error creating the stream.public void setFilters(COSBase filters) throws java.io.IOException
filters - The filters to set on this stream.java.io.IOException - If there is an error clearing the old filters.public java.io.OutputStream createUnfilteredStream()
throws java.io.IOException
java.io.IOException - If there is an error creating the stream.public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeable