Class ArchiveEntryInputStream

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

    public class ArchiveEntryInputStream
    extends RAInputStream
    RAInputStream implementation based on the ArchiveEntry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()
      Returns the number of bytes that can be read (or skipped over) from this random access input stream without blocking by the next caller of a method for this input stream.
      void close()  
      long getOffset()  
      long length()  
      int read()  
      int read​(byte[] b, int off, int len)  
      void readFully​(byte[] b, int off, int len)  
      int readInt()  
      long readLong()  
      void refresh()  
      void seek​(long localPos)  
      • Methods inherited from class java.io.InputStream

        mark, markSupported, nullInputStream, 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
    • Method Detail

      • 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
      • read

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

        public int available()
                      throws java.io.IOException
        Description copied from class: RAInputStream
        Returns the number of bytes that can be read (or skipped over) from this random access input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread.

        This abstract class is extended by RAFolderInputStream and RAFileInputStream

        The available method returns -1 when no more data because the end of the stream has been reached.

        and returns Integer.MAX_VALUE when bytes of data is larger then Integer.MAX_VALUE.

        Specified by:
        available in class RAInputStream
        Throws:
        java.io.IOException
      • getOffset

        public long getOffset()
                       throws java.io.IOException
        Specified by:
        getOffset in class RAInputStream
        Throws:
        java.io.IOException
      • length

        public long length()
                    throws java.io.IOException
        Specified by:
        length in class RAInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in class RAInputStream
        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
      • readInt

        public int readInt()
                    throws java.io.IOException
        Specified by:
        readInt in class RAInputStream
        Returns:
        Throws:
        java.io.IOException
      • readLong

        public long readLong()
                      throws java.io.IOException
        Specified by:
        readLong in class RAInputStream
        Throws:
        java.io.IOException
      • refresh

        public void refresh()
                     throws java.io.IOException
        Specified by:
        refresh in class RAInputStream
        Throws:
        java.io.IOException
      • seek

        public void seek​(long localPos)
                  throws java.io.IOException
        Specified by:
        seek in class RAInputStream
        Throws:
        java.io.IOException