Class YCbCrUpsamplerStream

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

    final class YCbCrUpsamplerStream
    extends java.io.FilterInputStream
    Input stream that provides on-the-fly upsampling of TIFF subsampled YCbCr samples.
    Version:
    $Id: YCbCrUpsamplerStream.java,v 1.0 31.01.13 09:25 haraldk Exp$
    • Constructor Summary

      Constructors 
      Constructor Description
      YCbCrUpsamplerStream​(java.io.InputStream stream, int[] chromaSub, int yCbCrPos, int columns)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void decodeRows()  
      private void fetch()  
      boolean markSupported()  
      int read()  
      int read​(byte[] b, int off, int len)  
      void reset()  
      long skip​(long n)  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, read
      • 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

      • horizChromaSub

        private final int horizChromaSub
      • vertChromaSub

        private final int vertChromaSub
      • yCbCrPos

        private final int yCbCrPos
      • columns

        private final int columns
      • units

        private final int units
      • unitSize

        private final int unitSize
      • padding

        private final int padding
      • decodedRows

        private final byte[] decodedRows
      • decodedLength

        int decodedLength
      • decodedPos

        int decodedPos
      • buffer

        private final byte[] buffer
      • bufferLength

        int bufferLength
      • bufferPos

        int bufferPos
    • Constructor Detail

      • YCbCrUpsamplerStream

        public YCbCrUpsamplerStream​(java.io.InputStream stream,
                                    int[] chromaSub,
                                    int yCbCrPos,
                                    int columns)
    • Method Detail

      • fetch

        private void fetch()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRows

        private void decodeRows()
                         throws java.io.EOFException
        Throws:
        java.io.EOFException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.FilterInputStream
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.FilterInputStream
        Throws:
        java.io.IOException