Class ASCII85OutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.itextpdf.io.source.ASCII85OutputStream
All Implemented Interfaces:
IFinishable, Closeable, Flushable, AutoCloseable

public class ASCII85OutputStream extends FilterOutputStream implements IFinishable
An output stream that encodes data according to the ASCII85Decode filter from the PDF specification.
  • Constructor Details

    • ASCII85OutputStream

      public ASCII85OutputStream (OutputStream out)
      Creates a new ASCIIHexDecode encoding stream.
      Parameters:
      out - the output stream to write encoded data to
  • Method Details

    • write

      public void write (int b) throws IOException
      Overrides:
      write in class FilterOutputStream
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class FilterOutputStream
      Throws:
      IOException
    • finish

      public void finish() throws IOException
      Is called to finalize the stream, implementing classes should ensure that the underlying output stream remains open after this method is called.

      This method completes any pending write operations, flushes internal buffers, writes any final data required by the stream format, and releases resources associated with the stream processing. However, unlike OutputStream.close(), it does not close the underlying output stream.

      After calling this method, no further data should be written to this stream, but the underlying stream remains open and can be used for other operations.

      This method should be idempotent - calling it multiple times should have the same effect as calling it once.

      Specified by:
      finish in interface IFinishable
      Throws:
      IOException - if an I/O error occurs during finalization