Class MyBitInputStream

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

    public class MyBitInputStream
    extends java.io.InputStream
    • Constructor Summary

      Constructors 
      Constructor Description
      MyBitInputStream​(java.io.InputStream is, java.nio.ByteOrder byteOrder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void flushCache()  
      long getBytesRead()  
      int read()  
      int readBits​(int sampleBits)  
      void setTiffLZWMode()  
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • is

        private final java.io.InputStream is
      • byteOrder

        private final java.nio.ByteOrder byteOrder
      • tiffLZWMode

        private boolean tiffLZWMode
      • bytesRead

        private long bytesRead
      • bitsInCache

        private int bitsInCache
      • bitCache

        private int bitCache
    • Constructor Detail

      • MyBitInputStream

        public MyBitInputStream​(java.io.InputStream is,
                                java.nio.ByteOrder byteOrder)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • setTiffLZWMode

        public void setTiffLZWMode()
      • readBits

        public int readBits​(int sampleBits)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • flushCache

        public void flushCache()
      • getBytesRead

        public long getBytesRead()