COSObjectablepublic class PDMemoryStream extends PDStream
| Constructor | Description |
|---|---|
PDMemoryStream(byte[] buffer) |
This will create a new PDStream object.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCompression() |
If there are not compression filters on the current stream then this
will add a compression filter, flate compression for example.
|
java.io.InputStream |
createInputStream() |
This will get a stream that can be read from.
|
java.io.OutputStream |
createOutputStream() |
This will get a stream that can be written to.
|
byte[] |
getByteArray() |
This will copy the stream into a byte array.
|
COSBase |
getCOSObject() |
Convert this standard java object to a COS object.
|
java.util.List |
getDecodeParams() |
Get the list of decode parameters.
|
PDFileSpecification |
getFile() |
This will get the file specification for this stream.
|
java.util.List |
getFileDecodeParams() |
Get the list of decode parameters.
|
java.util.List |
getFileFilters() |
This will get the list of filters that are associated with this stream.
|
java.util.List |
getFilters() |
This will get the list of filters that are associated with this stream.
|
int |
getLength() |
This will get the length of the filtered/compressed stream.
|
PDMetadata |
getMetadata() |
Get the metadata that is part of the document catalog.
|
java.io.InputStream |
getPartiallyFilteredStream(java.util.List stopFilters) |
This will get a stream with some filters applied but not others.
|
COSStream |
getStream() |
Get the cos stream associated with this object.
|
void |
setDecodeParams(java.util.List decodeParams) |
This will set the list of decode params.
|
void |
setFile(PDFileSpecification f) |
Set the file specification.
|
void |
setFileDecodeParams(java.util.List decodeParams) |
This will set the list of decode params.
|
void |
setFileFilters(java.util.List filters) |
This will set the filters that are part of this stream.
|
void |
setFilters(java.util.List filters) |
This will set the filters that are part of this stream.
|
void |
setMetadata(PDMetadata meta) |
Set the metadata for this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateFromCOS, getDecodedStreamLength, getDecodeParms, getInputStreamAsString, setDecodedStreamLength, setDecodeParmspublic PDMemoryStream(byte[] buffer)
buffer - The data for this in memory stream.public void addCompression()
addCompression in class PDStreampublic COSBase getCOSObject()
getCOSObject in interface COSObjectablegetCOSObject in class PDStreampublic java.io.OutputStream createOutputStream()
throws java.io.IOException
createOutputStream in class PDStreamjava.io.IOException - If an IO error occurs during writing.public java.io.InputStream createInputStream()
throws java.io.IOException
createInputStream in class PDStreamjava.io.IOException - If an IO error occurs during reading.public java.io.InputStream getPartiallyFilteredStream(java.util.List stopFilters)
throws java.io.IOException
getPartiallyFilteredStream in class PDStreamstopFilters - A list of filters to stop decoding at.java.io.IOException - If there is an error processing the stream.public COSStream getStream()
public int getLength()
public java.util.List getFilters()
getFilters in class PDStreampublic void setFilters(java.util.List filters)
setFilters in class PDStreamfilters - The filters that are part of this stream.public java.util.List getDecodeParams()
throws java.io.IOException
java.io.IOException - if there is an error retrieving the parameters.public void setDecodeParams(java.util.List decodeParams)
decodeParams - The list of decode params.public PDFileSpecification getFile()
public void setFile(PDFileSpecification f)
public java.util.List getFileFilters()
getFileFilters in class PDStreampublic void setFileFilters(java.util.List filters)
setFileFilters in class PDStreamfilters - The filters that are part of this stream.public java.util.List getFileDecodeParams()
throws java.io.IOException
getFileDecodeParams in class PDStreamjava.io.IOException - if there is an error retrieving the parameters.public void setFileDecodeParams(java.util.List decodeParams)
setFileDecodeParams in class PDStreamdecodeParams - The list of decode params.public byte[] getByteArray()
throws java.io.IOException
getByteArray in class PDStreamjava.io.IOException - When getFilteredStream did not workpublic PDMetadata getMetadata()
getMetadata in class PDStreampublic void setMetadata(PDMetadata meta)
setMetadata in class PDStreammeta - The meta data for this object.