public class FileChannelWrapper extends FileChannel
FileChannel.MapMode| Constructor and Description |
|---|
FileChannelWrapper(FileChannel fileChannel) |
| Modifier and Type | Method and Description |
|---|---|
void |
force(boolean metaData) |
protected void |
implCloseChannel() |
FileLock |
lock(long position,
long size,
boolean shared) |
MappedByteBuffer |
map(FileChannel.MapMode mapMode,
long position,
long size) |
long |
position() |
FileChannel |
position(long newPosition) |
int |
read(ByteBuffer byteBuffer) |
long |
read(ByteBuffer[] byteBuffers,
int offset,
int length) |
int |
read(ByteBuffer byteBuffer,
long position) |
long |
size() |
long |
transferFrom(ReadableByteChannel readableByteChannel,
long position,
long count) |
long |
transferTo(long position,
long count,
WritableByteChannel target) |
FileChannel |
truncate(long size) |
FileLock |
tryLock(long position,
long size,
boolean shared) |
int |
write(ByteBuffer byteBuffer) |
long |
write(ByteBuffer[] byteBuffers,
int offset,
int length) |
int |
write(ByteBuffer byteBuffer,
long position) |
begin, close, end, isOpenpublic FileChannelWrapper(FileChannel fileChannel)
public void force(boolean metaData)
throws IOException
force in class FileChannelIOExceptionpublic FileLock lock(long position, long size, boolean shared) throws IOException
lock in class FileChannelIOExceptionpublic MappedByteBuffer map(FileChannel.MapMode mapMode, long position, long size) throws IOException
map in class FileChannelIOExceptionpublic long position()
throws IOException
position in interface SeekableByteChannelposition in class FileChannelIOExceptionpublic FileChannel position(long newPosition) throws IOException
position in interface SeekableByteChannelposition in class FileChannelIOExceptionpublic int read(ByteBuffer byteBuffer) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelread in class FileChannelIOExceptionpublic int read(ByteBuffer byteBuffer, long position) throws IOException
read in class FileChannelIOExceptionpublic long read(ByteBuffer[] byteBuffers, int offset, int length) throws IOException
read in interface ScatteringByteChannelread in class FileChannelIOExceptionpublic long size()
throws IOException
size in interface SeekableByteChannelsize in class FileChannelIOExceptionpublic long transferFrom(ReadableByteChannel readableByteChannel, long position, long count) throws IOException
transferFrom in class FileChannelIOExceptionpublic long transferTo(long position,
long count,
WritableByteChannel target)
throws IOException
transferTo in class FileChannelIOExceptionpublic FileChannel truncate(long size) throws IOException
truncate in interface SeekableByteChanneltruncate in class FileChannelIOExceptionpublic FileLock tryLock(long position, long size, boolean shared) throws IOException
tryLock in class FileChannelIOExceptionpublic int write(ByteBuffer byteBuffer) throws IOException
write in interface SeekableByteChannelwrite in interface WritableByteChannelwrite in class FileChannelIOExceptionpublic int write(ByteBuffer byteBuffer, long position) throws IOException
write in class FileChannelIOExceptionpublic long write(ByteBuffer[] byteBuffers, int offset, int length) throws IOException
write in interface GatheringByteChannelwrite in class FileChannelIOExceptionprotected void implCloseChannel()
implCloseChannel in class AbstractInterruptibleChannel