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.InputStream
An input stream that is backed by a file store.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
alwaysClose
private CompressTool
compress
private boolean
endOfFile
private Data
page
private int
remainingInBuffer
private FileStore
store
-
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 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)
-
-
-
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:
available
in classjava.io.InputStream
-
read
public int read(byte[] buff) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in 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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
finalize
protected void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-