Class FileChannelInputStream
java.lang.Object
java.io.InputStream
org.h2.store.fs.FileChannelInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Allows to read from a file channel like an input stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate final FileChannelprivate final booleanprivate long -
Constructor Summary
ConstructorsConstructorDescriptionFileChannelInputStream(FileChannel channel, boolean closeChannel) Create a new file object input stream from the file channel. -
Method Summary
Methods inherited from class InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
channel
-
closeChannel
private final boolean closeChannel -
buffer
-
pos
private long pos
-
-
Constructor Details
-
FileChannelInputStream
Create a new file object input stream from the file channel.- Parameters:
channel- the file channelcloseChannel- whether closing the stream should close the channel
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-