Package org.verapdf.cos.visitor
Class Writer
java.lang.Object
org.verapdf.cos.visitor.Writer
- All Implemented Interfaces:
IVisitor
- Direct Known Subclasses:
IndirectWriter
- Author:
- Timur Kamalov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final COSDocumentstatic final Stringprotected COSXRefInfoprotected InternalOutputStream -
Constructor Summary
ConstructorsConstructorDescriptionWriter(COSDocument document, String filename, boolean append, long incrementalOffset) Writer(COSDocument document, String filename, long incrementalOffset) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToWrite(List<COSKey> keys) voidaddToWrite(COSKey key) voidprotected voidvoidclear()voidclose()voidfreeObjects(Map<COSKey, Long> keys) protected voidprotected COSKeygetKeyToWrite(COSKey key) protected longvoidsetTrailer(COSTrailer trailer) voidsetTrailer(COSTrailer trailer, long prev) voidvisitFromArray(COSArray obj) voidvoidvoidvoidvoidvisitFromName(COSName obj) voidvisitFromNull(COSNull obj) voidvisitFromReal(COSReal obj) voidvisitFromStream(COSStream obj) voidvisitFromString(COSString obj) protected voidwrite(boolean value) protected voidwrite(char value) protected voidwrite(int value) protected voidwrite(long value) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidwrite(COSXRefEntry value) protected voidwrite(COSXRefRange value) protected voidwrite(COSXRefSection value) voidvoidwriteHeader(String header) voidwriteIncrementalUpdate(List<COSObject> changedObjects, List<COSObject> addedObjects) void
-
Field Details
-
os
-
info
-
document
-
toWrite
-
written
-
EOL
- See Also:
-
-
Constructor Details
-
Writer
- Throws:
IOException
-
Writer
public Writer(COSDocument document, String filename, boolean append, long incrementalOffset) throws IOException - Throws:
IOException
-
-
Method Details
-
writeIncrementalUpdate
-
visitFromBoolean
- Specified by:
visitFromBooleanin interfaceIVisitor
-
visitFromInteger
- Specified by:
visitFromIntegerin interfaceIVisitor
-
visitFromReal
- Specified by:
visitFromRealin interfaceIVisitor
-
visitFromString
- Specified by:
visitFromStringin interfaceIVisitor
-
visitFromName
- Specified by:
visitFromNamein interfaceIVisitor
-
visitFromArray
- Specified by:
visitFromArrayin interfaceIVisitor
-
visitFromDictionary
- Specified by:
visitFromDictionaryin interfaceIVisitor
-
visitFromStream
- Specified by:
visitFromStreamin interfaceIVisitor
-
visitFromNull
- Specified by:
visitFromNullin interfaceIVisitor
-
visitFromIndirect
- Specified by:
visitFromIndirectin interfaceIVisitor
-
writeHeader
-
addToWrite
-
addToWrite
-
writeBody
public void writeBody() -
freeObjects
-
setTrailer
-
setTrailer
-
writeXRefInfo
public void writeXRefInfo() -
getXRefInfo
-
clear
public void clear() -
close
public void close() -
getOffset
protected long getOffset() -
write
- Throws:
IOException
-
generateID
protected void generateID() -
getKeyToWrite
-
addXRef
-
addXRef
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-