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

private class COSWriterObjectStream.DirectAccessByteArrayOutputStream extends ByteArrayOutputStream
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.
  • 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.