Class MemoryFirstPdfWriter
java.lang.Object
java.io.OutputStream
com.itextpdf.io.source.HighPrecisionOutputStream<PdfOutputStream>
com.itextpdf.kernel.pdf.PdfOutputStream
com.itextpdf.kernel.pdf.PdfWriter
com.itextpdf.kernel.utils.MemoryFirstPdfWriter
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
PdfWriter implementation which allows to create documents in memory and dump them on disk on purpose.
Currently, it's private and used in automated tests only.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final intprivate final ByteArrayOutputStreamprivate static final Map<String, MemoryFirstPdfWriter> Fields inherited from class PdfWriter
isUserWarnedAboutAcroFormCopying, propertiesFields inherited from class PdfOutputStream
crypto, documentFields inherited from class HighPrecisionOutputStream
closeStream, currentPos, outputStream -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)MemoryFirstPdfWriter(String filename, WriterProperties properties) privateMemoryFirstPdfWriter(String filename, ByteArrayOutputStream outputStream, WriterProperties properties) -
Method Summary
Modifier and TypeMethodDescription(package private) static voidprivate static ByteArrayOutputStream(package private) voiddump()(package private) static MemoryFirstPdfWriter(package private) ByteArrayOutputStreamMethods inherited from class PdfWriter
copyObject, copyObject, flushModifiedWaitingObjects, flushObject, flushWaitingObjects, getCompressionLevel, getPdfVersion, getProperties, initCryptoIfSpecified, isFullCompression, setCompressionLevel, setSmartMode, writeHeader, writeToBodyMethods inherited from class PdfOutputStream
checkEncryption, containsFlateFilter, decodeFlateBytes, updateCompressionFilter, writeMethods inherited from class HighPrecisionOutputStream
assignBytes, close, flush, getCurrentPos, getHighPrecision, getLocalHighPrecision, getOutputStream, isCloseStream, reset, setCloseStream, setHighPrecision, setLocalHighPrecision, write, write, write, writeByte, writeByte, writeBytes, writeBytes, writeDouble, writeDouble, writeFloat, writeFloat, writeFloats, writeInteger, writeLong, writeNewLine, writeSpace, writeStringMethods inherited from class OutputStream
nullOutputStream
-
Field Details
-
MAX_ALLOWED_STREAMS
private static final int MAX_ALLOWED_STREAMS- See Also:
-
waitingStreams
-
filePath
-
outStream
-
-
Constructor Details
-
MemoryFirstPdfWriter
MemoryFirstPdfWriter(String filename, WriterProperties properties) -
MemoryFirstPdfWriter
private MemoryFirstPdfWriter(String filename, ByteArrayOutputStream outputStream, WriterProperties properties)
-
-
Method Details
-
get
-
cleanup
-
dump
- Throws:
IOException
-
getBAOutputStream
ByteArrayOutputStream getBAOutputStream() -
createBAOutputStream
-