Package com.itextpdf.kernel.pdf
Class PdfOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
PdfWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
protected PdfEncryption
Contains the business logic for cryptography.protected PdfDocument
Document associated with PdfOutputStream.private static final byte[]
private static final byte[]
private static final byte[]
private static final org.slf4j.Logger
private static final byte[]
private static final byte[]
Fields inherited from class com.itextpdf.io.source.OutputStream
closeStream, currentPos, outputStream
-
Constructor Summary
ConstructorsConstructorDescriptionPdfOutputStream
(OutputStream outputStream) Create a pdfOutputSteam writing to the passed OutputStream. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkEncryption
(PdfStream pdfStream) protected boolean
containsFlateFilter
(PdfStream pdfStream) protected byte[]
decodeFlateBytes
(PdfStream stream, byte[] bytes) private static boolean
decodeParamsArrayNotFlushed
(PdfStream pdfStream) private static boolean
isFlushed
(PdfDictionary dict, PdfName name) private boolean
isNotMetadataPdfStream
(PdfStream pdfStream) private boolean
isXRefStream
(PdfStream pdfStream) protected void
updateCompressionFilter
(PdfStream pdfStream) (package private) void
write
(int bytes, int size) Writes corresponding amount of bytes from a given int(package private) void
write
(long bytes, int size) Writes corresponding amount of bytes from a given longprivate void
private void
write
(PdfDictionary pdfDictionary) private void
write
(PdfIndirectReference indirectReference) private void
write
(PdfLiteral literal) private void
private void
Write a PdfObject to the outputstream.private void
write
(PdfPrimitiveObject pdfPrimitive) private void
private void
Methods inherited from class com.itextpdf.io.source.OutputStream
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, writeString
Methods inherited from class java.io.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
-