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, isOpen
public static FileChannel open(Path path, OpenOption... options) throws IOException
IOException
public abstract int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
IOException
public abstract long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read
in interface ScatteringByteChannel
IOException
public final long read(ByteBuffer[] dsts) throws IOException
read
in interface ScatteringByteChannel
IOException
public abstract int write(ByteBuffer src) throws IOException
write
in interface WritableByteChannel
IOException
public abstract long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write
in interface GatheringByteChannel
IOException
public final long write(ByteBuffer[] srcs) throws IOException
write
in interface GatheringByteChannel
IOException
public abstract long position() throws IOException
IOException
public abstract FileChannel position(long newPosition) throws IOException
IOException
public abstract long size() throws IOException
IOException
public abstract FileChannel truncate(long size) throws IOException
IOException
public abstract void force(boolean metaData) throws IOException
IOException
public abstract long transferTo(long position, long count, WritableByteChannel target) throws IOException
IOException
public abstract long transferFrom(ReadableByteChannel src, long position, long count) throws IOException
IOException
public abstract int read(ByteBuffer dst, long position) throws IOException
IOException
public abstract int write(ByteBuffer src, long position) throws IOException
IOException
public abstract MappedByteBuffer map(FileChannel.MapMode mode, long position, long size) throws IOException
IOException
public abstract FileLock lock(long position, long size, boolean shared) throws IOException
IOException
public final FileLock lock() throws IOException
IOException
public abstract FileLock tryLock(long position, long size, boolean shared) throws IOException
IOException
public final FileLock tryLock() throws IOException
IOException
Copyright © 2019 JBoss by Red Hat. All rights reserved.