public class CosStream extends CosDictionary
DIRECT, INDIRECT, t_Array, t_Boolean, t_Dictionary, t_KeyAbsent, t_Name, t_Null, t_Numeric, t_ObjectRef, t_Stream, t_String| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
copyStream(T destStm,
boolean encoded)
Copy the stream data into the given OutputStream.
|
boolean |
equals(CosObject value)
This method follows three criteria to check:
1) both should be instance of CosStream.
|
CosArray |
getInputFiltersList()
This method returns the filter list with which this stream is encoded currently.
|
long |
getLength()
return the length of the CosStream.
|
CosArray |
getOutputFiltersList()
Returns filter list that shall be used when this stream is written.
|
long |
getStreamDataOffset()
Return stream data offset or -1 if object has never been written.
|
InputByteStream |
getStreamDecoded()
Obtains a slice of the underlying InputByteStream.
|
InputStream |
getStreamDecodedNoCopying()
Returns underlying stream as
InputStream. |
InputByteStream |
getStreamEncoded()
Obtains a slice of the underlying InputByteStream.
|
int |
getType()
return the type of this CosObject
|
boolean |
isEncoded()
Returns true if this stream is encoded else false.
|
void |
newDataDecoded(InputByteStream byteStream)
Set new unencrypted and decoded data for this CosStream.
|
void |
newDataEncoded(InputByteStream byteStream)
Set new unencrypted but already encoded data for this CosStream.
|
CosObject |
put(ASName key,
CosObject cosObject)
This method is overridden from CosDictionary in order to catch any
changes that might affect the ability to decode the stream body
|
CosObject |
remove(ASName key)
Removes the key mapping from the dictionary.
|
void |
setOutputFiltersList(CosArray filters)
This method sets the filter list which are used while writing this stream.
|
String |
toString() |
clear, containsKey, copy, get, getBoolean, getCosArray, getCosDictionary, getCosStream, getCosString, getDouble, getInheritable, getInt, getKeyForValue, getKeys, getLong, getName, getStream, getString, getType, getValue, getValuesIterator, isEmpty, isInvalidDict, keyIterator, keySet, put, put, put, put, put, put, put, put, put, put, put, put, put, setEncryptionState, setRepairedValue, size, valuesfindObjPos, markNotDirtybooleanValue, doubleValue, equals, getDocument, getObjEOF, getObjGen, getObjNum, getObjPos, getObjRevision, getStreamManager, hexStringValue, intValue, isCompressed, isDirty, isIndirect, longValue, nameValue, numberValue, stringValue, textValuepublic CosObject put(ASName key, CosObject cosObject) throws PDFCosParseException, PDFIOException, PDFSecurityException
put in class CosDictionarykey - Key for the entrycosObject - CosObject value for the entryPDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic CosObject remove(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
CosDictionaryremove in class CosDictionarykey - Key mapping to removePDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic int getType()
getType in class CosDictionarypublic long getLength()
throws PDFCosParseException,
PDFIOException,
PDFSecurityException
public InputByteStream getStreamDecoded() throws PDFCosParseException, PDFIOException, PDFSecurityException
PDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic InputStream getStreamDecodedNoCopying() throws PDFCosParseException, PDFIOException, PDFSecurityException
InputStream. If the stream is encrypted, then a copy of
decrypted stream is returned. In case of filters, filter stream is returned instead of copying it.
The caller is responsible for closing this InputStream when they are finished with it.InputStreamPDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic InputByteStream getStreamEncoded() throws PDFCosParseException, PDFIOException, PDFSecurityException
PDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic <T> boolean copyStream(T destStm,
boolean encoded)
throws PDFCosParseException,
PDFIOException,
PDFSecurityException
destStm - the destination for the stream dataencoded - copy the data as encoded if true; decoded if falsePDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic void newDataDecoded(InputByteStream byteStream) throws PDFCosParseException, PDFIOException, PDFSecurityException
byteStream - the new data stream to give to this objectPDFSecurityExceptionPDFIOExceptionPDFCosParseExceptionpublic void newDataEncoded(InputByteStream byteStream) throws PDFCosParseException, PDFIOException, PDFSecurityException
byteStream - the new data stream to give to this objectPDFSecurityExceptionPDFIOExceptionPDFCosParseExceptionpublic void setOutputFiltersList(CosArray filters) throws PDFCosParseException, PDFIOException, IOException, PDFSecurityException
filters - PDFCosParseExceptionIOExceptionPDFSecurityExceptionPDFIOExceptionpublic CosArray getOutputFiltersList()
public CosArray getInputFiltersList() throws PDFCosParseException, PDFIOException, PDFSecurityException
public long getStreamDataOffset()
public boolean equals(CosObject value)
equals in class CosDictionaryvalue - public boolean isEncoded()
throws PDFCosParseException,
PDFIOException,
PDFSecurityException,
IOException
PDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved