Class COSWriterObjectStream.DirectAccessByteArrayOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.apache.pdfbox.pdfwriter.compress.COSWriterObjectStream.DirectAccessByteArrayOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
COSWriterObjectStream
Reuse the underlying byte array instead of copying it.
This is a private class as reusing the byte array may have some unwanted side effects.
-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeToMethods inherited from class java.io.OutputStream
flush, write
-
Constructor Details
-
DirectAccessByteArrayOutputStream
private DirectAccessByteArrayOutputStream()
-
-
Method Details
-
getRawData
public byte[] getRawData()Gets the underlying byte array. It is most likely bigger than the real size of the stream, so that you have to take the size of the stream into account when accessing the data.- Returns:
- the underlying byte array.
-