Class BufferedRandomAccessInputStream

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

    public class BufferedRandomAccessInputStream
    extends java.io.InputStream
    Used to wrap a RandomAccessFile with multiple buffers so that different locations can each have a buffer for the file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      long getFilePointer()  
      boolean markSupported()  
      int read()  
      int read​(byte[] b, int off, int len)  
      void seek​(long pos)  
      • Methods inherited from class java.io.InputStream

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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BufferedRandomAccessInputStream

        public BufferedRandomAccessInputStream​(java.io.RandomAccessFile in)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • BufferedRandomAccessInputStream

        public BufferedRandomAccessInputStream​(java.io.RandomAccessFile in,
                                               int bufsize)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • read

        public final int read()
                       throws java.io.IOException
        Specified by:
        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
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.InputStream
      • 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
      • seek

        public void seek​(long pos)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getFilePointer

        public long getFilePointer()