public class COSStream extends COSDictionary implements Closeable
items| Constructor and Description |
|---|
COSStream()
Constructor.
|
COSStream(COSDictionary dictionary)
Constructor.
|
COSStream(COSDictionary dictionary,
ScratchFile scratchFile)
Constructor.
|
COSStream(ScratchFile scratchFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
equals(Object obj) |
DecodeResult |
getDecodeResult()
Returns the repaired stream parameters dictionary.
|
long |
getFilteredLength()
This will get the length of the encoded stream.
|
RandomAccessRead |
getFilteredRandomAccess()
This will get the data with all of the filters applied.
|
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.
|
Long |
getOriginLength() |
String |
getString()
Returns the contents of the stream as a text string.
|
RandomAccessRead |
getUnfilteredRandomAccess()
This will get the logical content with none of the filters.
|
InputStream |
getUnfilteredStream()
This will get the logical content stream with none of the filters.
|
Boolean |
isEndstreamKeywordEOLCompliant() |
boolean |
isStreamKeywordCRLFCompliant() |
void |
setEndstreamKeywordEOLCompliant(Boolean endStreamSpacingsComplyPDFA) |
void |
setFilters(COSBase filters)
set the filters to be applied to the stream.
|
void |
setOriginLength(Long originLength) |
void |
setStreamKeywordCRLFCompliant(boolean streamSpacingsComplyPDFA) |
addAll, asUnmodifiableDictionary, clear, containsKey, containsKey, containsValue, entrySet, getBoolean, getBoolean, getBoolean, getCOSName, getCOSName, getDate, getDate, getDate, getDate, getDictionaryObject, getDictionaryObject, getDictionaryObject, getDictionaryObject, getEmbeddedDate, getEmbeddedDate, getEmbeddedDate, getEmbeddedDate, getEmbeddedInt, getEmbeddedInt, getEmbeddedInt, getEmbeddedInt, getEmbeddedString, getEmbeddedString, getEmbeddedString, getEmbeddedString, getFlag, 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, isNeedToBeUpdated, keySet, mergeInto, removeItem, setBoolean, setBoolean, setDate, setDate, setEmbeddedDate, setEmbeddedDate, setEmbeddedInt, setEmbeddedInt, setEmbeddedString, setEmbeddedString, setFlag, setFloat, setFloat, setInt, setInt, setItem, setItem, setItem, setItem, setLong, setLong, setName, setName, setNeedToBeUpdated, setString, setString, size, toStringpublic COSStream()
public COSStream(COSDictionary dictionary)
dictionary - The dictionary that is associated with this stream.public COSStream(ScratchFile scratchFile)
scratchFile - scratch file to use.public COSStream(COSDictionary dictionary, ScratchFile scratchFile)
dictionary - The dictionary that is associated with this stream.scratchFile - The scratch file to use.public InputStream getFilteredStream() throws IOException
IOException - when encoding causes an exceptionpublic RandomAccessRead getFilteredRandomAccess() throws IOException
IOException - when encoding causes an exceptionpublic long getFilteredLength()
throws IOException
IOException - if something went wrongpublic InputStream getUnfilteredStream() throws IOException
IOException - when decoding causes an exceptionpublic RandomAccessRead getUnfilteredRandomAccess() throws IOException
IOException - when decoding causes an exceptionpublic DecodeResult getDecodeResult() throws IOException
IOException - when encoding/decoding causes an exceptionpublic Object accept(ICOSVisitor visitor) throws IOException
COSDictionaryaccept in class COSDictionaryvisitor - The object to notify when visiting this object.IOException - If there is an error visiting this object.public COSBase getFilters()
public String getString()
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 Long getOriginLength()
public void setOriginLength(Long originLength)
public boolean isStreamKeywordCRLFCompliant()
public void setStreamKeywordCRLFCompliant(boolean streamSpacingsComplyPDFA)
public Boolean isEndstreamKeywordEOLCompliant()
public void setEndstreamKeywordEOLCompliant(Boolean endStreamSpacingsComplyPDFA)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean equals(Object obj)
equals in class COSDictionaryCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.