Package org.h2.store
Class FileStoreInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.h2.store.FileStoreInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class FileStoreInputStream extends java.io.InputStreamAn input stream that is backed by a file store.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanalwaysCloseprivate CompressToolcompressprivate booleanendOfFileprivate Datapageprivate intremainingInBufferprivate FileStorestore
-
Constructor Summary
Constructors Constructor Description FileStoreInputStream(FileStore store, boolean compression, boolean alwaysClose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()private voidfillBuffer()protected voidfinalize()intread()intread(byte[] buff)intread(byte[] b, int off, int len)private intreadBlock(byte[] buff, int off, int len)
-
-
-
Field Detail
-
store
private FileStore store
-
page
private final Data page
-
remainingInBuffer
private int remainingInBuffer
-
compress
private final CompressTool compress
-
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:
availablein classjava.io.InputStream
-
read
public int read(byte[] buff) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
-