PDF Clown
0.1.2

org.pdfclown.objects
Class PdfStream

java.lang.Object
  extended by org.pdfclown.objects.PdfObject
      extended by org.pdfclown.objects.PdfDataObject
          extended by org.pdfclown.objects.PdfStream
All Implemented Interfaces:
Cloneable, IFileResource, IVisitable
Direct Known Subclasses:
ObjectStream, XRefStream

public class PdfStream
extends PdfDataObject
implements IFileResource

PDF stream object [PDF:1.6:3.2.7].

Version:
0.1.2, 12/28/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
PdfStream()
           
PdfStream(IBuffer body)
           
PdfStream(PdfDictionary header)
           
PdfStream(PdfDictionary header, IBuffer body)
           
 
Method Summary
 PdfObject accept(IVisitor visitor, Object data)
          Accepts a visit.
 PdfStream clone(File context)
          Creates a deep copy of this object within the specified file context.
 IBuffer getBody()
          Gets the decoded stream body.
 IBuffer getBody(boolean decode)
          Gets the stream body.
 FileSpecification<?> getDataFile()
          Gets the file containing the object data.
 PdfDirectObject getFilter()
           
 PdfDictionary getHeader()
          Gets the stream header.
 PdfDirectObject getParameters()
           
 PdfObject getParent()
          Gets the parent of this object.
 boolean isUpdateable()
          Gets whether the detection of object state changes is enabled.
 boolean isUpdated()
          Gets whether the initial state of this object has been modified.
protected  boolean isVirtual()
          Gets whether this object acts like a null-object placeholder.
 void setDataFile(FileSpecification<?> value)
           
 void setDataFile(FileSpecification<?> value, boolean preserve)
           
protected  void setFilter(PdfDirectObject value)
           
protected  void setParameters(PdfDirectObject value)
           
 void setUpdateable(boolean value)
           
protected  void setUpdated(boolean value)
           
protected  void setVirtual(boolean value)
           
 PdfStream swap(PdfObject other)
          Swaps contents between this object and the other one.
 void writeTo(IOutputStream stream, File context)
          Serializes this object to the specified stream.
 
Methods inherited from class org.pdfclown.objects.PdfObject
clone, clone, getContainer, getDataContainer, getFile, getIndirectObject, getReference, resolve, resolve, unresolve, unresolve, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfStream

public PdfStream()

PdfStream

public PdfStream(PdfDictionary header)

PdfStream

public PdfStream(IBuffer body)

PdfStream

public PdfStream(PdfDictionary header,
                 IBuffer body)
Method Detail

accept

public PdfObject accept(IVisitor visitor,
                        Object data)
Description copied from interface: IVisitable
Accepts a visit.

Specified by:
accept in interface IVisitable
Parameters:
visitor - Visiting object.
data - Supplemental data.
Returns:
Result object.

clone

public PdfStream clone(File context)
Description copied from class: PdfObject
Creates a deep copy of this object within the specified file context.

Overrides:
clone in class PdfObject

getBody

public IBuffer getBody()
Gets the decoded stream body.


getBody

public IBuffer getBody(boolean decode)
Gets the stream body.

Parameters:
decode - Defines whether the body has to be decoded.

getFilter

public PdfDirectObject getFilter()

getHeader

public PdfDictionary getHeader()
Gets the stream header.


getParameters

public PdfDirectObject getParameters()

getParent

public PdfObject getParent()
Description copied from class: PdfObject
Gets the parent of this object.

Specified by:
getParent in class PdfObject
See Also:
PdfObject.getContainer()

isUpdateable

public boolean isUpdateable()
Description copied from class: PdfObject
Gets whether the detection of object state changes is enabled.

Specified by:
isUpdateable in class PdfObject

isUpdated

public boolean isUpdated()
Description copied from class: PdfObject
Gets whether the initial state of this object has been modified.

Specified by:
isUpdated in class PdfObject

setDataFile

public void setDataFile(FileSpecification<?> value,
                        boolean preserve)
Parameters:
preserve - Indicates whether the data from the old data source substitutes the new one. This way data can be imported to/exported from local or preserved in case of external file location changed.
See Also:
setDataFile(FileSpecification)

setUpdateable

public void setUpdateable(boolean value)
Specified by:
setUpdateable in class PdfObject
See Also:
PdfObject.isUpdateable()

swap

public PdfStream swap(PdfObject other)
Description copied from class: PdfObject
Swaps contents between this object and the other one.

Specified by:
swap in class PdfObject
Parameters:
other - Object whose contents have to be swapped with this one's.
Returns:
This object.

writeTo

public void writeTo(IOutputStream stream,
                    File context)
Description copied from class: PdfObject
Serializes this object to the specified stream.

Specified by:
writeTo in class PdfObject
Parameters:
stream - Target stream.
context - File context.

getDataFile

@PDF(value=PDF12)
public FileSpecification<?> getDataFile()
Description copied from interface: IFileResource
Gets the file containing the object data.

Specified by:
getDataFile in interface IFileResource

setDataFile

public void setDataFile(FileSpecification<?> value)
Specified by:
setDataFile in interface IFileResource
See Also:
IFileResource.getDataFile()

isVirtual

protected boolean isVirtual()
Description copied from class: PdfObject
Gets whether this object acts like a null-object placeholder.

Specified by:
isVirtual in class PdfObject

setFilter

protected void setFilter(PdfDirectObject value)
See Also:
getFilter()

setParameters

protected void setParameters(PdfDirectObject value)
See Also:
getParameters()

setUpdated

protected void setUpdated(boolean value)
Specified by:
setUpdated in class PdfObject
See Also:
PdfObject.isUpdated()

setVirtual

protected void setVirtual(boolean value)
Specified by:
setVirtual in class PdfObject
See Also:
PdfObject.isVirtual()

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.