public class FakeFileChannel extends FileChannel
FileChannel.MapMode| 限定符和类型 | 字段和说明 |
|---|---|
static FakeFileChannel |
INSTANCE
No need to allocate these, they have no state
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
force(boolean metaData) |
protected void |
implCloseChannel() |
FileLock |
lock(long position,
long size,
boolean shared) |
MappedByteBuffer |
map(FileChannel.MapMode mode,
long position,
long size) |
long |
position() |
FileChannel |
position(long newPosition) |
int |
read(ByteBuffer dst) |
long |
read(ByteBuffer[] dsts,
int offset,
int length) |
int |
read(ByteBuffer dst,
long position) |
long |
size() |
long |
transferFrom(ReadableByteChannel src,
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 src) |
long |
write(ByteBuffer[] srcs,
int offset,
int len) |
int |
write(ByteBuffer src,
long position) |
begin, close, end, isOpenpublic static final FakeFileChannel INSTANCE
protected void implCloseChannel()
throws IOException
implCloseChannel 在类中 AbstractInterruptibleChannelIOExceptionpublic FileLock lock(long position, long size, boolean shared) throws IOException
lock 在类中 FileChannelIOExceptionpublic MappedByteBuffer map(FileChannel.MapMode mode, long position, long size) throws IOException
map 在类中 FileChannelIOExceptionpublic long position()
throws IOException
position 在接口中 SeekableByteChannelposition 在类中 FileChannelIOExceptionpublic FileChannel position(long newPosition) throws IOException
position 在接口中 SeekableByteChannelposition 在类中 FileChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read 在接口中 ReadableByteChannelread 在接口中 SeekableByteChannelread 在类中 FileChannelIOExceptionpublic int read(ByteBuffer dst, long position) throws IOException
read 在类中 FileChannelIOExceptionpublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read 在接口中 ScatteringByteChannelread 在类中 FileChannelIOExceptionpublic long size()
throws IOException
size 在接口中 SeekableByteChannelsize 在类中 FileChannelIOExceptionpublic long transferFrom(ReadableByteChannel src, long position, long count) throws IOException
transferFrom 在类中 FileChannelIOExceptionpublic long transferTo(long position,
long count,
WritableByteChannel target)
throws IOException
transferTo 在类中 FileChannelIOExceptionpublic FileChannel truncate(long size) throws IOException
truncate 在接口中 SeekableByteChanneltruncate 在类中 FileChannelIOExceptionpublic FileLock tryLock(long position, long size, boolean shared) throws IOException
tryLock 在类中 FileChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write 在接口中 SeekableByteChannelwrite 在接口中 WritableByteChannelwrite 在类中 FileChannelIOExceptionpublic int write(ByteBuffer src, long position) throws IOException
write 在类中 FileChannelIOExceptionpublic long write(ByteBuffer[] srcs, int offset, int len) throws IOException
write 在接口中 GatheringByteChannelwrite 在类中 FileChannelIOExceptionpublic void force(boolean metaData)
throws IOException
force 在类中 FileChannelIOExceptionCopyright © 2022. All rights reserved.