Package org.h2.store.fs
Class FileBaseDefault
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.store.fs.FileBaseDefault
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,ReadableByteChannel,ScatteringByteChannel,SeekableByteChannel,WritableByteChannel
- Direct Known Subclasses:
FileEncrypt
Default implementation of the slow operations that need synchronization because they
involve the file position.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidimplTruncate(long size) The truncate implementation.final longposition()final FileChannelposition(long newPosition) final intread(ByteBuffer dst) final FileChanneltruncate(long newLength) final intwrite(ByteBuffer src) Methods inherited from class org.h2.store.fs.FileBase
force, implCloseChannel, lock, map, read, read, transferFrom, transferTo, tryLock, write, writeMethods inherited from class java.nio.channels.FileChannel
lock, open, open, read, size, tryLock, writeMethods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Constructor Details
-
FileBaseDefault
public FileBaseDefault()
-
-
Method Details
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Specified by:
readin classFileChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Specified by:
writein classFileChannel- Throws:
IOException
-
truncate
- Specified by:
truncatein interfaceSeekableByteChannel- Specified by:
truncatein classFileChannel- Throws:
IOException
-
implTruncate
The truncate implementation.- Parameters:
size- the new size- Throws:
IOException- on failure
-