|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.cos.COSBase
org.apache.pdfbox.cos.COSDictionary
org.apache.pdfbox.cos.COSStream
public class COSStream
This class represents a stream object in a PDF document.
| Field Summary |
|---|
| Fields inherited from class org.apache.pdfbox.cos.COSDictionary |
|---|
items |
| Constructor Summary | |
|---|---|
COSStream(COSDictionary dictionary,
RandomAccess storage)
Constructor. |
|
COSStream(RandomAccess storage)
Constructor. |
|
| Method Summary | |
|---|---|
Object |
accept(ICOSVisitor visitor)
visitor pattern double dispatch method. |
void |
close()
|
OutputStream |
createFilteredStream()
This will create a new stream for which filtered byte should be written to. |
OutputStream |
createFilteredStream(COSBase expectedLength)
This will create a new stream for which filtered byte should be written to. |
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. |
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. |
List<Object> |
getStreamTokens()
This will get all the tokens in the stream. |
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. |
| Methods inherited from class org.apache.pdfbox.cos.COSBase |
|---|
getCOSObject, getFilterManager, isDirect, isNeedToBeUpdate, setDirect, setNeedToBeUpdate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
public void replaceWithStream(COSStream stream)
stream - The stream that have the new values in it.public RandomAccess getScratchFile()
public List<Object> getStreamTokens()
throws IOException
IOException - If there is an error parsing the stream.
public InputStream getFilteredStream()
throws IOException
IOException - when encoding/decoding causes an exception
public long getFilteredLength()
throws IOException
IOExceptionpublic void setFilteredLength(long length)
length - the expected length of the encoded stream.
public long getFilteredLengthWritten()
throws IOException
IOException
public InputStream getUnfilteredStream()
throws IOException
IOException - when encoding/decoding causes an exception
public 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 OutputStream createFilteredStream()
throws IOException
IOException - If there is an error creating the stream.
public OutputStream createFilteredStream(COSBase expectedLength)
throws IOException
expectedLength - An entry where a length is expected.
IOException - If there is an error creating the stream.
public void setFilters(COSBase filters)
throws IOException
filters - The filters to set on this stream.
IOException - If there is an error clearing the old filters.
public OutputStream createUnfilteredStream()
throws IOException
IOException - If there is an error creating the stream.public void close()
close in interface Closeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||