Class PdfOutputStream
java.lang.Object
java.io.OutputStream
com.itextpdf.io.source.HighPrecisionOutputStream<PdfOutputStream>
com.itextpdf.kernel.pdf.PdfOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
- Direct Known Subclasses:
PdfWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]protected PdfEncryptionContains the business logic for cryptography.protected PdfDocumentDocument associated with PdfOutputStream.private static final byte[]private static final byte[]private static final byte[]private static final org.slf4j.Loggerprivate static final byte[]private static final byte[]Fields inherited from class HighPrecisionOutputStream
closeStream, currentPos, outputStream -
Constructor Summary
ConstructorsConstructorDescriptionPdfOutputStream(OutputStream outputStream) Create a pdfOutputSteam writing to the passed OutputStream. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckEncryption(PdfStream pdfStream) protected booleancontainsFlateFilter(PdfStream pdfStream) protected byte[]decodeFlateBytes(PdfStream stream, byte[] bytes) private static booleandecodeParamsArrayNotFlushed(PdfStream pdfStream) private static booleanisFlushed(PdfDictionary dict, PdfName name) private booleanisNotMetadataPdfStream(PdfStream pdfStream) private booleanisXRefStream(PdfStream pdfStream) protected voidupdateCompressionFilter(PdfStream pdfStream) (package private) voidwrite(int bytes, int size) Writes corresponding amount of bytes from a given int(package private) voidwrite(long bytes, int size) Writes corresponding amount of bytes from a given longprivate voidprivate voidwrite(PdfDictionary pdfDictionary) private voidwrite(PdfIndirectReference indirectReference) private voidwrite(PdfLiteral literal) private voidprivate voidWrite a PdfObject to the outputstream.private voidwrite(PdfPrimitiveObject pdfPrimitive) private voidprivate voidMethods 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
-
stream
private static final byte[] stream -
endstream
private static final byte[] endstream -
openDict
private static final byte[] openDict -
closeDict
private static final byte[] closeDict -
endIndirect
private static final byte[] endIndirect -
endIndirectWithZeroGenNr
private static final byte[] endIndirectWithZeroGenNr -
LOGGER
private static final org.slf4j.Logger LOGGER -
document
Document associated with PdfOutputStream. -
crypto
Contains the business logic for cryptography.
-
-
Constructor Details
-
PdfOutputStream
Create a pdfOutputSteam writing to the passed OutputStream.- Parameters:
outputStream- Outputstream to write to.
-
-
Method Details
-
write
Write a PdfObject to the outputstream.- Parameters:
pdfObject- PdfObject to write- Returns:
- this PdfOutPutStream
-
write
Writes corresponding amount of bytes from a given long- Parameters:
bytes- a source of bytes, must be >= 0size- expected amount of bytes- Throws:
IOException
-
write
Writes corresponding amount of bytes from a given int- Parameters:
bytes- a source of bytes, must be >= 0size- expected amount of bytes- Throws:
IOException
-
write
-
write
-
write
-
write
-
write
-
write
-
write
-
write
-
isNotMetadataPdfStream
-
isXRefStream
-
write
-
checkEncryption
-
containsFlateFilter
-
updateCompressionFilter
-
decodeFlateBytes
-
isFlushed
-
decodeParamsArrayNotFlushed
-