|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.pdfbox.pdmodel.common.PDStream
org.pdfbox.pdmodel.common.PDMemoryStream
A PDStream represents a stream in a PDF document. Streams are tied to a single PDF document.
| Constructor Summary | |
PDMemoryStream(byte[] buffer)
This will create a new PDStream object. |
|
| Method Summary | |
void |
addCompression()
If there are not compression filters on the current stream then this will add a compression filter, flate compression for example. |
InputStream |
createInputStream()
This will get a stream that can be read from. |
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. |
List |
getDecodeParams()
Get the list of decode parameters. |
PDFileSpecification |
getFile()
This will get the file specification for this stream. |
List |
getFileDecodeParams()
Get the list of decode parameters. |
List |
getFileFilters()
This will get the list of filters that are associated with this stream. |
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. |
InputStream |
getPartiallyFilteredStream(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(List decodeParams)
This will set the list of decode params. |
void |
setFile(PDFileSpecification f)
Set the file specification. |
void |
setFileDecodeParams(List decodeParams)
This will set the list of decode params. |
void |
setFileFilters(List filters)
This will set the filters that are part of this stream. |
void |
setFilters(List filters)
This will set the filters that are part of this stream. |
void |
setMetadata(PDMetadata meta)
Set the metadata for this object. |
| Methods inherited from class org.pdfbox.pdmodel.common.PDStream |
createFromCOS, getInputStreamAsString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PDMemoryStream(byte[] buffer)
buffer - The data for this in memory stream.| Method Detail |
public void addCompression()
addCompression in class PDStreampublic COSBase getCOSObject()
getCOSObject in interface COSObjectablegetCOSObject in class PDStream
public OutputStream createOutputStream()
throws IOException
createOutputStream in class PDStreamIOException - If an IO error occurs during writing.
public InputStream createInputStream()
throws IOException
createInputStream in class PDStreamIOException - If an IO error occurs during reading.
public InputStream getPartiallyFilteredStream(List stopFilters)
throws IOException
getPartiallyFilteredStream in class PDStreamstopFilters - A list of filters to stop decoding at.
IOException - If there is an error processing the stream.public COSStream getStream()
getStream in class PDStreampublic int getLength()
getLength in class PDStreampublic List getFilters()
getFilters in class PDStreampublic void setFilters(List filters)
setFilters in class PDStreamfilters - The filters that are part of this stream.
public List getDecodeParams()
throws IOException
getDecodeParams in class PDStreamIOException - if there is an error retrieving the parameters.public void setDecodeParams(List decodeParams)
setDecodeParams in class PDStreamdecodeParams - The list of decode params.public PDFileSpecification getFile()
getFile in class PDStreampublic void setFile(PDFileSpecification f)
setFile in class PDStreamf - The file specification.public List getFileFilters()
getFileFilters in class PDStreampublic void setFileFilters(List filters)
setFileFilters in class PDStreamfilters - The filters that are part of this stream.
public List getFileDecodeParams()
throws IOException
getFileDecodeParams in class PDStreamIOException - if there is an error retrieving the parameters.public void setFileDecodeParams(List decodeParams)
setFileDecodeParams in class PDStreamdecodeParams - The list of decode params.
public byte[] getByteArray()
throws IOException
getByteArray in class PDStreamIOException - 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.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||