|
||||||||||
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
org.apache.pdfbox.pdmodel.common.COSStreamArray
public class COSStreamArray
This will take an array of streams and sequence them together.
Field Summary |
---|
Fields inherited from class org.apache.pdfbox.cos.COSDictionary |
---|
items |
Constructor Summary | |
---|---|
COSStreamArray(COSArray array)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
accept(ICOSVisitor visitor)
visitor pattern double dispatch method. |
void |
appendStream(COSStream streamToAppend)
Appends a new stream to the array that represents this object's stream. |
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. |
COSBase |
get(int index)
This will get a stream (or the reference to a stream) from the array. |
COSDictionary |
getDictionary()
This will get the dictionary that is associated with this stream. |
COSBase |
getDictionaryObject(COSName key)
This will get an object from this streams dictionary and dereference it if necessary. |
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 the method will return |
COSBase |
getItem(COSName key)
This will get an object from this streams dictionary. |
RandomAccess |
getScratchFile()
This will get the scratch file associated with this stream. |
int |
getStreamCount()
This will get the number of streams in the array. |
java.util.List |
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 |
insertCOSStream(PDStream streamToBeInserted)
Insert the given stream at the beginning of the existing stream array. |
void |
setFilters(COSBase filters)
set the filters to be applied to the stream. |
java.lang.String |
toString()
|
Methods inherited from class org.apache.pdfbox.cos.COSStream |
---|
replaceWithStream |
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 COSStreamArray(COSArray array)
array
- The array of COSStreams to concatenate together.Method Detail |
---|
public COSBase get(int index)
index
- The index of the requested stream
public int getStreamCount()
public RandomAccess getScratchFile()
getScratchFile
in class COSStream
public COSBase getItem(COSName key)
getItem
in class COSDictionary
key
- The key to the object.
public COSBase getDictionaryObject(COSName key)
getDictionaryObject
in class COSDictionary
key
- The key to the object.
public java.lang.String toString()
toString
in class COSDictionary
public java.util.List getStreamTokens() throws java.io.IOException
getStreamTokens
in class COSStream
java.io.IOException
- If there is an error parsing the stream.public COSDictionary getDictionary()
public java.io.InputStream getFilteredStream() throws java.io.IOException
getFilteredStream
in class COSStream
java.io.IOException
- when encoding/decoding causes an exceptionpublic java.io.InputStream getUnfilteredStream() throws java.io.IOException
getUnfilteredStream
in class COSStream
java.io.IOException
- when encoding/decoding causes an exceptionpublic java.lang.Object accept(ICOSVisitor visitor) throws COSVisitorException
accept
in class COSStream
visitor
- The object to notify when visiting this object.
COSVisitorException
- If an error occurs while visiting this object.public COSBase getFilters()
getFilters
in class COSStream
public java.io.OutputStream createFilteredStream() throws java.io.IOException
createFilteredStream
in class COSStream
java.io.IOException
- If there is an error creating the stream.public java.io.OutputStream createFilteredStream(COSBase expectedLength) throws java.io.IOException
createFilteredStream
in class COSStream
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
setFilters
in class COSStream
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
createUnfilteredStream
in class COSStream
java.io.IOException
- If there is an error creating the stream.public void appendStream(COSStream streamToAppend)
streamToAppend
- The stream to append.public void insertCOSStream(PDStream streamToBeInserted)
streamToBeInserted
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |