public abstract class FileChannel
extends java.nio.channels.spi.AbstractInterruptibleChannel
implements java.nio.channels.GatheringByteChannel, java.nio.channels.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) |
java.nio.channels.FileLock |
lock() |
abstract java.nio.channels.FileLock |
lock(long position,
long size,
boolean shared) |
abstract java.nio.MappedByteBuffer |
map(FileChannel.MapMode mode,
long position,
long size) |
static FileChannel |
open(java.nio.file.Path path,
java.nio.file.OpenOption... options) |
abstract long |
position() |
abstract FileChannel |
position(long newPosition) |
abstract int |
read(java.nio.ByteBuffer dst) |
long |
read(java.nio.ByteBuffer[] dsts) |
abstract long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length) |
abstract int |
read(java.nio.ByteBuffer dst,
long position) |
abstract long |
size() |
abstract long |
transferFrom(java.nio.channels.ReadableByteChannel src,
long position,
long count) |
abstract long |
transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target) |
abstract FileChannel |
truncate(long size) |
java.nio.channels.FileLock |
tryLock() |
abstract java.nio.channels.FileLock |
tryLock(long position,
long size,
boolean shared) |
abstract int |
write(java.nio.ByteBuffer src) |
long |
write(java.nio.ByteBuffer[] srcs) |
abstract long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
abstract int |
write(java.nio.ByteBuffer src,
long position) |
begin, close, end, implCloseChannel, isOpenpublic static FileChannel open(java.nio.file.Path path, java.nio.file.OpenOption... options) throws java.io.IOException
java.io.IOExceptionpublic abstract int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic abstract long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic final long read(java.nio.ByteBuffer[] dsts)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic abstract int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic abstract long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
write in interface java.nio.channels.GatheringByteChanneljava.io.IOExceptionpublic final long write(java.nio.ByteBuffer[] srcs)
throws java.io.IOException
write in interface java.nio.channels.GatheringByteChanneljava.io.IOExceptionpublic abstract long position()
throws java.io.IOException
java.io.IOExceptionpublic abstract FileChannel position(long newPosition) throws java.io.IOException
java.io.IOExceptionpublic abstract long size()
throws java.io.IOException
java.io.IOExceptionpublic abstract FileChannel truncate(long size) throws java.io.IOException
java.io.IOExceptionpublic abstract void force(boolean metaData)
throws java.io.IOException
java.io.IOExceptionpublic abstract long transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target)
throws java.io.IOException
java.io.IOExceptionpublic abstract long transferFrom(java.nio.channels.ReadableByteChannel src,
long position,
long count)
throws java.io.IOException
java.io.IOExceptionpublic abstract int read(java.nio.ByteBuffer dst,
long position)
throws java.io.IOException
java.io.IOExceptionpublic abstract int write(java.nio.ByteBuffer src,
long position)
throws java.io.IOException
java.io.IOExceptionpublic abstract java.nio.MappedByteBuffer map(FileChannel.MapMode mode, long position, long size) throws java.io.IOException
java.io.IOExceptionpublic abstract java.nio.channels.FileLock lock(long position,
long size,
boolean shared)
throws java.io.IOException
java.io.IOExceptionpublic final java.nio.channels.FileLock lock()
throws java.io.IOException
java.io.IOExceptionpublic abstract java.nio.channels.FileLock tryLock(long position,
long size,
boolean shared)
throws java.io.IOException
java.io.IOExceptionpublic final java.nio.channels.FileLock tryLock()
throws java.io.IOException
java.io.IOExceptionCopyright © 2016 JBoss, a division of Red Hat, Inc.