Class COSOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public final class COSOutputStream
    extends java.io.FilterOutputStream
    An OutputStream which writes to an encoded COS stream.
    • Constructor Detail

      • COSOutputStream

        COSOutputStream​(java.util.List<Filter> filters,
                        COSDictionary parameters,
                        java.io.OutputStream output,
                        RandomAccessStreamCache streamCache)
                 throws java.io.IOException
        Creates a new COSOutputStream writes to an encoded COS stream.
        Parameters:
        filters - Filters to apply.
        parameters - Filter parameters.
        output - Encoded stream.
        streamCache - Stream cache to use.
        Throws:
        java.io.IOException - If there was an error creating a temporary buffer
    • Method Detail

      • write

        public void write​(byte[] b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(int b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterOutputStream
        Throws:
        java.io.IOException