public abstract class FileChannel extends AbstractInterruptibleChannel implements GatheringByteChannel, ScatteringByteChannel
| Modifier and Type | Class and Description |
|---|---|
static class |
FileChannel.MapMode |
| Modifier | Constructor and Description |
|---|---|
protected |
FileChannel() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
force(boolean metaData) |
FileLock |
lock() |
abstract FileLock |
lock(long position,
long size,
boolean shared) |
abstract MappedByteBuffer |
map(FileChannel.MapMode mode,
long position,
long size) |
static FileChannel |
open(Path path,
OpenOption... options) |
abstract long |
position() |
abstract FileChannel |
position(long newPosition) |
abstract int |
read(ByteBuffer dst) |
long |
read(ByteBuffer[] dsts) |
abstract long |
read(ByteBuffer[] dsts,
int offset,
int length) |
abstract int |
read(ByteBuffer dst,
long position) |
abstract long |
size() |
abstract long |
transferFrom(ReadableByteChannel src,
long position,
long count) |
abstract long |
transferTo(long position,
long count,
WritableByteChannel target) |
abstract FileChannel |
truncate(long size) |
FileLock |
tryLock() |
abstract FileLock |
tryLock(long position,
long size,
boolean shared) |
abstract int |
write(ByteBuffer src) |
long |
write(ByteBuffer[] srcs) |
abstract long |
write(ByteBuffer[] srcs,
int offset,
int length) |
abstract int |
write(ByteBuffer src,
long position) |
begin, close, end, implCloseChannel, isOpenpublic static FileChannel open(Path path, OpenOption... options) throws IOException
IOExceptionpublic abstract int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelIOExceptionpublic abstract long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read in interface ScatteringByteChannelIOExceptionpublic final long read(ByteBuffer[] dsts) throws IOException
read in interface ScatteringByteChannelIOExceptionpublic abstract int write(ByteBuffer src) throws IOException
write in interface WritableByteChannelIOExceptionpublic abstract long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface GatheringByteChannelIOExceptionpublic final long write(ByteBuffer[] srcs) throws IOException
write in interface GatheringByteChannelIOExceptionpublic abstract long position()
throws IOException
IOExceptionpublic abstract FileChannel position(long newPosition) throws IOException
IOExceptionpublic abstract long size()
throws IOException
IOExceptionpublic abstract FileChannel truncate(long size) throws IOException
IOExceptionpublic abstract void force(boolean metaData)
throws IOException
IOExceptionpublic abstract long transferTo(long position,
long count,
WritableByteChannel target)
throws IOException
IOExceptionpublic abstract long transferFrom(ReadableByteChannel src, long position, long count) throws IOException
IOExceptionpublic abstract int read(ByteBuffer dst, long position) throws IOException
IOExceptionpublic abstract int write(ByteBuffer src, long position) throws IOException
IOExceptionpublic abstract MappedByteBuffer map(FileChannel.MapMode mode, long position, long size) throws IOException
IOExceptionpublic abstract FileLock lock(long position, long size, boolean shared) throws IOException
IOExceptionpublic final FileLock lock() throws IOException
IOExceptionpublic abstract FileLock tryLock(long position, long size, boolean shared) throws IOException
IOExceptionpublic final FileLock tryLock() throws IOException
IOExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.