Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.common » [javadoc | source]
org.apache.pdfbox.pdmodel.common
public class: PDMemoryStream [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.common.PDStream
      org.apache.pdfbox.pdmodel.common.PDMemoryStream

All Implemented Interfaces:
    COSObjectable

A PDStream represents a stream in a PDF document. Streams are tied to a single PDF document.
Constructor:
 public PDMemoryStream(byte[] buffer) 
Method from org.apache.pdfbox.pdmodel.common.PDMemoryStream Summary:
addCompression,   createInputStream,   createOutputStream,   getByteArray,   getCOSObject,   getDecodeParams,   getFile,   getFileDecodeParams,   getFileFilters,   getFilters,   getLength,   getMetadata,   getPartiallyFilteredStream,   getStream,   setDecodeParams,   setFile,   setFileDecodeParams,   setFileFilters,   setFilters,   setMetadata
Methods from org.apache.pdfbox.pdmodel.common.PDStream:
addCompression,   createFromCOS,   createInputStream,   createOutputStream,   getByteArray,   getCOSObject,   getDecodeParms,   getDecodedStreamLength,   getFile,   getFileDecodeParams,   getFileFilters,   getFilters,   getInputStreamAsString,   getLength,   getMetadata,   getPartiallyFilteredStream,   getStream,   setDecodeParms,   setDecodedStreamLength,   setFile,   setFileDecodeParams,   setFileFilters,   setFilters,   setMetadata
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.common.PDMemoryStream Detail:
 public  void addCompression() 
    If there are not compression filters on the current stream then this will add a compression filter, flate compression for example.
 public InputStream createInputStream() throws IOException 
    This will get a stream that can be read from.
 public OutputStream createOutputStream() throws IOException 
    This will get a stream that can be written to.
 public byte[] getByteArray() throws IOException 
    This will copy the stream into a byte array.
 public COSBase getCOSObject() 
    Convert this standard java object to a COS object.
 public List getDecodeParams() throws IOException 
    Get the list of decode parameters. Each entry in the list will refer to an entry in the filters list.
 public PDFileSpecification getFile() 
    This will get the file specification for this stream. This is only required for external files.
 public List getFileDecodeParams() throws IOException 
    Get the list of decode parameters. Each entry in the list will refer to an entry in the filters list.
 public List getFileFilters() 
    This will get the list of filters that are associated with this stream. Or null if there are none.
 public List getFilters() 
    This will get the list of filters that are associated with this stream. Or null if there are none.
 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.
 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.
 public InputStream getPartiallyFilteredStream(List 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
 public COSStream getStream() 
    Get the cos stream associated with this object.
 public  void setDecodeParams(List decodeParams) 
    This will set the list of decode params.
 public  void setFile(PDFileSpecification f) 
    Set the file specification.
 public  void setFileDecodeParams(List decodeParams) 
    This will set the list of decode params.
 public  void setFileFilters(List filters) 
    This will set the filters that are part of this stream.
 public  void setFilters(List filters) 
    This will set the filters that are part of this stream.
 public  void setMetadata(PDMetadata meta) 
    Set the metadata for this object. This can be null.