Class MyBitInputStream

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

    public class MyBitInputStream
    extends java.io.FilterInputStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int bitCache  
      private int bitsInCache  
      private java.nio.ByteOrder byteOrder  
      private long bytesRead  
      private boolean tiffLZWMode  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

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

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

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

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

      • byteOrder

        private final java.nio.ByteOrder byteOrder
      • tiffLZWMode

        private final 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,
                                boolean tiffLZWMode)
    • Method Detail

      • flushCache

        public void flushCache()
      • getBytesRead

        public long getBytesRead()
      • read

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

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