|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSDocumentElement
de.intarsys.pdf.cos.COSObject
de.intarsys.pdf.cos.COSCompositeObject
de.intarsys.pdf.cos.COSObjectProxy
public abstract class COSObjectProxy
A "proxy object" used to intercept the visitor callback from the serializer.
Field Summary |
---|
Fields inherited from class de.intarsys.pdf.cos.COSObject |
---|
CONSTANT_CONTAINER, NULL_CONTAINER, SLOT_CONTAINER |
Constructor Summary | |
---|---|
COSObjectProxy()
Create a COSObjectProxy |
Method Summary | |
---|---|
Object |
accept(ICOSObjectVisitor visitor)
Accept a visitor object. |
Iterator |
basicIterator()
An iterator over contained objects and references. |
COSObject |
copyDeep(Map copied)
Make a deep copy of the receiver within the same document. |
COSObject |
copyShallow()
Make a copy of the receiver. |
COSObject |
dereference()
return the real object. this is needed for polymorphic handling of document elements. at application programming level only COSObject, never COSReference is seen. |
void |
ended(COSWriter writer)
Attention: The user must handle encryption by himself. |
int |
getLength()
The length within the data stream for the serialization of this. |
COSObject |
getObject()
The object represented by this. |
long |
getPosition()
The position within the data stream for the serialization of this. |
Iterator |
iterator()
An iterator over contained objects. |
void |
reserveData(int pLength)
Reserve length bytes for the serialization of this. |
Object |
saveState()
|
void |
setPosition(long position)
Assign the position within the data stream. |
Methods inherited from class de.intarsys.pdf.cos.COSCompositeObject |
---|
addObjectListener, associate, containable, copyDeep, disassociate, getAttribute, isObjectListenerAvailable, isPrimitive, referenceCount, referenceIndirect, register, removeAttribute, removeObjectListener, restoreStateContainer, saveStateContainer, setAttribute, willChange |
Methods inherited from class de.intarsys.pdf.cos.COSObject |
---|
asArray, asBoolean, asDictionary, asFixed, asInteger, asName, asNull, asNumber, asStream, asString, beConstant, beIndirect, containable, copyOptional, copySubGraph, getContainer, getDoc, getIndirectObject, isDangling, isIndirect, isNull, isNumber, isSwapped, restoreState, stringValue, toString |
Methods inherited from class de.intarsys.pdf.cos.COSDocumentElement |
---|
handleException, isReference |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.intarsys.pdf.cos.ICOSContainer |
---|
getDoc |
Constructor Detail |
---|
public COSObjectProxy()
COSObjectProxy
Method Detail |
---|
public Object accept(ICOSObjectVisitor visitor) throws COSVisitorException
COSDocumentElement
visitor
by "double dispatching".
accept
in class COSDocumentElement
visitor
- The object visiting the receiver.
COSVisitorException
- An exception depending on the visitor semantics.public Iterator basicIterator()
COSObject
This iterator returns COSDocumentElements, leaving references alone.
basicIterator
in class COSObject
public COSObject copyDeep(Map copied)
COSObject
The copied
map is used to identify objects copied in
earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document).
copied
is modified while executing copyDeep
and contains a mapping from indirect objects in the original document to
copied objects.
The algorithm copies this
along with all outgoing
references (recursively).
Object identity is preserved.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyDeep
in class COSCompositeObject
COSObject.copyDeep()
public COSObject copyShallow()
COSObject
A copy is made of the receiver and after this recursively of all not indirect objects.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyShallow
in class COSObject
public COSObject dereference()
COSObject
dereference
in class COSObject
public void ended(COSWriter writer) throws IOException
writer
-
IOException
public int getLength()
public COSObject getObject()
public long getPosition()
public Iterator iterator()
COSObject
This iterator returns only COSObject instances, references are dereferenced.
iterator
in class COSObject
public void reserveData(int pLength)
length
bytes for the serialization of this.
pLength
- Number of bytes to be reserved.public Object saveState()
saveState
in interface de.intarsys.tools.component.ISaveStateSupport
public void setPosition(long position)
position
- The position within the data stream.
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |