Package org.h2.store

Class FileStoreInputStream

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

    public class FileStoreInputStream
    extends java.io.InputStream
    An input stream that is backed by a file store.
    • Method Summary

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

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

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

      • page

        private final Data page
      • remainingInBuffer

        private int remainingInBuffer
      • endOfFile

        private boolean endOfFile
      • alwaysClose

        private final boolean alwaysClose
    • Constructor Detail

      • FileStoreInputStream

        public FileStoreInputStream​(FileStore store,
                                    boolean compression,
                                    boolean alwaysClose)
    • Method Detail

      • available

        public int available()
        Overrides:
        available in class java.io.InputStream
      • read

        public int read​(byte[] buff)
                 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[] buff,
                              int off,
                              int len)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • fillBuffer

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

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • read

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