Class LZFInputStream

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

    public class LZFInputStream
    extends java.io.InputStream
    An input stream to read from an LZF stream. The data is automatically expanded.
    • Constructor Summary

      Constructors 
      Constructor Description
      LZFInputStream​(java.io.InputStream in)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private static byte[] ensureSize​(byte[] buff, int len)  
      private void fillBuffer()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      private int readBlock​(byte[] b, int off, int len)  
      private void readFully​(byte[] buff, int len)  
      private int readInt()  
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, nullInputStream, 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

      • in

        private final java.io.InputStream in
      • pos

        private int pos
      • bufferLength

        private int bufferLength
      • inBuffer

        private byte[] inBuffer
      • buffer

        private byte[] buffer
    • Constructor Detail

      • LZFInputStream

        public LZFInputStream​(java.io.InputStream in)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • ensureSize

        private static byte[] ensureSize​(byte[] buff,
                                         int len)
      • fillBuffer

        private void fillBuffer()
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readFully

        private void readFully​(byte[] buff,
                               int len)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readInt

        private int readInt()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • read

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

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

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

        private int readBlock​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        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.InputStream
        Throws:
        java.io.IOException