Package org.h2.store.fs
Class FileBase
- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.FileChannel
-
- org.h2.store.fs.FileBase
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.ByteChannel,java.nio.channels.Channel,java.nio.channels.GatheringByteChannel,java.nio.channels.InterruptibleChannel,java.nio.channels.ReadableByteChannel,java.nio.channels.ScatteringByteChannel,java.nio.channels.SeekableByteChannel,java.nio.channels.WritableByteChannel
- Direct Known Subclasses:
FileBaseDefault,FilePathCache.FileCache,FileRec,FileRetryOnInterrupt,FileZip
public abstract class FileBase extends java.nio.channels.FileChannelThe base class for file implementations.
-
-
Constructor Summary
Constructors Constructor Description FileBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforce(boolean metaData)protected voidimplCloseChannel()java.nio.channels.FileLocklock(long position, long size, boolean shared)java.nio.MappedByteBuffermap(java.nio.channels.FileChannel.MapMode mode, long position, long size)longread(java.nio.ByteBuffer[] dsts, int offset, int length)intread(java.nio.ByteBuffer dst, long position)longtransferFrom(java.nio.channels.ReadableByteChannel src, long position, long count)longtransferTo(long position, long count, java.nio.channels.WritableByteChannel target)java.nio.channels.FileLocktryLock(long position, long size, boolean shared)longwrite(java.nio.ByteBuffer[] srcs, int offset, int length)intwrite(java.nio.ByteBuffer src, long position)-
Methods inherited from class java.nio.channels.FileChannel
lock, open, open, position, position, read, read, size, truncate, tryLock, write, write
-
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
-
-
-
Method Detail
-
read
public int read(java.nio.ByteBuffer dst, long position) throws java.io.IOException- Specified by:
readin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src, long position) throws java.io.IOException- Specified by:
writein classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
force
public void force(boolean metaData) throws java.io.IOException- Specified by:
forcein classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
implCloseChannel
protected void implCloseChannel() throws java.io.IOException- Specified by:
implCloseChannelin classjava.nio.channels.spi.AbstractInterruptibleChannel- Throws:
java.io.IOException
-
lock
public java.nio.channels.FileLock lock(long position, long size, boolean shared) throws java.io.IOException- Specified by:
lockin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
map
public java.nio.MappedByteBuffer map(java.nio.channels.FileChannel.MapMode mode, long position, long size) throws java.io.IOException- Specified by:
mapin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ScatteringByteChannel- Specified by:
readin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
transferFrom
public long transferFrom(java.nio.channels.ReadableByteChannel src, long position, long count) throws java.io.IOException- Specified by:
transferFromin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
transferTo
public long transferTo(long position, long count, java.nio.channels.WritableByteChannel target) throws java.io.IOException- Specified by:
transferToin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
tryLock
public java.nio.channels.FileLock tryLock(long position, long size, boolean shared) throws java.io.IOException- Specified by:
tryLockin classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException- Specified by:
writein interfacejava.nio.channels.GatheringByteChannel- Specified by:
writein classjava.nio.channels.FileChannel- Throws:
java.io.IOException
-
-