| Modifier and Type | Field and Description |
|---|---|
| private static final Log | |
| private final COSStream |
| Access | Constructor and Description |
|---|---|
| public | PDStream(PDDocument
The document that the stream will be part of. document)Creates a new empty PDStream object. |
| public | PDStream(COSDocument
The document that the stream will be part of. document)Creates a new empty PDStream object. |
| public | |
| public | PDStream(PDDocument
The document that will hold the stream. doc, InputStream The stream parameter. input)Constructor. |
| public | PDStream(PDDocument
The document that will hold the stream. doc, InputStream The stream parameter. input, COSName Filter to apply to the stream. filter)Constructor. |
| public | PDStream(PDDocument
The document that will hold the stream. doc, InputStream The stream parameter. input, COSArray Filters to apply to the stream. filters)Constructor. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public COSInputStream | Returns: An input stream that can be read from.This will get a stream that can be read from. |
| public COSInputStream | |
| public InputStream | Returns: A stream with decoded data.A list of filters to stop decoding at. stopFilters)This will get a stream with some filters applied but not others. |
| public OutputStream | Returns: An output stream to write data to.This will get a stream that can be written to. |
| public OutputStream | Returns: An output stream to write data to.the filter to be used. filter)This will get a stream that can be written to, with the given filter. |
| public COSStream | Returns: The cos object that matches this Java object.Implements org. Get the cos stream associated with this object. |
| public int | |
| public List | |
| public PDFileSpecification | |
| public List | |
| public List | Returns: A list of all encoding filters to apply to this stream.This will get the list of filters that are associated with this stream. |
| public List | Returns: A (possibly empty) list of all encoding filters to apply to this stream, never null.This will get the list of filters that are associated with this stream. |
| public int | Returns: The length of the filtered stream.This will get the length of the filtered/compressed stream. |
| public PDMetadata | Returns: The metadata for this object.Get the metadata that is part of the document catalog. |
| private List | |
| public void | setDecodedStreamLength(int
the decoded stream length decodedStreamLength)Set the decoded stream length. |
| public void | setDecodeParms(List<?>
The list of decode parameters. decodeParams)This will set the list of decode parameters. |
| public void | |
| public void | setFileDecodeParams(List<?>
The list of decode params. decodeParams)This will set the list of decode params. |
| public void | setFileFilters(List<String>
The filters that are part of this stream. filters)This will set the filters that are part of this stream. |
| public void | setFilters(List<COSName>
The filters that are part of this stream. filters)This will set the filters that are part of this stream. |
| public void | |
| public byte[] | Returns: The byte array of the filteredStream.This will copy the stream into a byte array. |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| stream | back to summary |
|---|---|
| private final COSStream stream | |
| PDStream | back to summary |
|---|---|
| public PDStream(PDDocument document) Creates a new empty PDStream object.
| |
| PDStream | back to summary |
|---|---|
| public PDStream(COSDocument document) Creates a new empty PDStream object.
| |
| PDStream | back to summary |
|---|---|
| public PDStream(COSStream str) Creates a PDStream which wraps the given COSStream.
| |
| PDStream | back to summary |
|---|---|
| public PDStream(PDDocument doc, InputStream input) throws IOException Constructor. Reads all data from the input stream and embeds it into the document. This method closes the InputStream.
| |
| PDStream | back to summary |
|---|---|
| public PDStream(PDDocument doc, InputStream input, COSName filter) throws IOException Constructor. Reads all data from the input stream and embeds it into the document with the given filter applied. This method closes the InputStream.
| |
| PDStream | back to summary |
|---|---|
| public PDStream(PDDocument doc, InputStream input, COSArray filters) throws IOException Constructor. Reads all data from the input stream and embeds it into the document with the given filters applied. This method closes the InputStream.
| |
| PDStream | back to summary |
|---|---|
| private PDStream(PDDocument doc, InputStream input, COSBase filters) throws IOException Constructor. Reads all data from the input stream and embeds it into the document with the given filters applied, if any. This method closes the InputStream. | |
| createInputStream | back to summary |
|---|---|
| public COSInputStream createInputStream() throws IOException This will get a stream that can be read from.
| |
| createInputStream | back to summary |
|---|---|
| public COSInputStream createInputStream(DecodeOptions options) throws IOException | |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream(List<String> stopFilters) throws IOException This will get a stream with some filters applied but not others. This is useful when doing images, ie filters = [flate,dct], we want to remove flate but leave dct
| |
| createOutputStream | back to summary |
|---|---|
| public OutputStream createOutputStream() throws IOException This will get a stream that can be written to.
| |
| createOutputStream | back to summary |
|---|---|
| public OutputStream createOutputStream(COSName filter) throws IOException This will get a stream that can be written to, with the given filter.
| |
| getCOSObject | back to summary |
|---|---|
| public COSStream getCOSObject() Implements org. Get the cos stream associated with this object. | |
| getDecodedStreamLength | back to summary |
|---|---|
| public int getDecodedStreamLength() Get the decoded stream length.
| |
| getDecodeParms | back to summary |
|---|---|
| public List Get the list of decode parameters. Each entry in the list will refer to an entry in the filters list.
| |
| getFile | back to summary |
|---|---|
| public PDFileSpecification getFile() throws IOException This will get the file specification for this stream. This is only required for external files.
| |
| getFileDecodeParams | back to summary |
|---|---|
| public List Get the list of decode parameters. Each entry in the list will refer to an entry in the filters list.
| |
| getFileFilters | back to summary |
|---|---|
| public List This will get the list of filters that are associated with this stream. The list is empty if there are none. | |
| getFilters | back to summary |
|---|---|
| public List This will get the list of filters that are associated with this stream. | |
| getLength | back to summary |
|---|---|
| public int getLength() This will get the length of the filtered/compressed stream. This is readonly in the PD Model and will be managed by this class.
| |
| getMetadata | back to summary |
|---|---|
| public PDMetadata getMetadata() Get the metadata that is part of the document catalog. This will return null if there is no meta data for this object.
| |
| internalGetDecodeParams | back to summary |
|---|---|
| private List | |
| setDecodedStreamLength | back to summary |
|---|---|
| public void setDecodedStreamLength(int decodedStreamLength) Set the decoded stream length.
| |
| setDecodeParms | back to summary |
|---|---|
| public void setDecodeParms(List<?> decodeParams) This will set the list of decode parameters.
| |
| setFile | back to summary |
|---|---|
| public void setFile(PDFileSpecification f) Set the file specification.
| |
| setFileDecodeParams | back to summary |
|---|---|
| public void setFileDecodeParams(List<?> decodeParams) This will set the list of decode params.
| |
| setFileFilters | back to summary |
|---|---|
| public void setFileFilters(List<String> filters) This will set the filters that are part of this stream. | |
| setFilters | back to summary |
|---|---|
| public void setFilters(List<COSName> filters) This will set the filters that are part of this stream. | |
| setMetadata | back to summary |
|---|---|
| public void setMetadata(PDMetadata meta) Set the metadata for this object. This can be null.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() throws IOException This will copy the stream into a byte array.
| |