Class COSInputStream

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

    public final class COSInputStream
    extends java.io.FilterInputStream
    An InputStream which reads from an encoded COS stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<DecodeResult> decodeResults  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private COSInputStream​(java.io.InputStream input, java.util.List<DecodeResult> decodeResults)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static COSInputStream create​(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile)
      Creates a new COSInputStream from an encoded input stream.
      (package private) static COSInputStream create​(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile, DecodeOptions options)  
      DecodeResult getDecodeResult()
      Returns the result of the last filter, for use by repair mechanisms.
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • decodeResults

        private final java.util.List<DecodeResult> decodeResults
    • Constructor Detail

      • COSInputStream

        private COSInputStream​(java.io.InputStream input,
                               java.util.List<DecodeResult> decodeResults)
        Constructor.
        Parameters:
        input - decoded stream
        decodeResults - results of decoding
    • Method Detail

      • create

        static COSInputStream create​(java.util.List<Filter> filters,
                                     COSDictionary parameters,
                                     java.io.InputStream in,
                                     ScratchFile scratchFile)
                              throws java.io.IOException
        Creates a new COSInputStream from an encoded input stream.
        Parameters:
        filters - Filters to be applied.
        parameters - Filter parameters.
        in - Encoded input stream.
        scratchFile - Scratch file to use, or null.
        Returns:
        Decoded stream.
        Throws:
        java.io.IOException - If the stream could not be read.
      • getDecodeResult

        public DecodeResult getDecodeResult()
        Returns the result of the last filter, for use by repair mechanisms.
        Returns:
        the result of the decoding.