java.nio.channels
Class FileChannel
java.lang.Object
|
+--java.nio.channels.spi.AbstractInterruptibleChannel
|
+--java.nio.channels.FileChannel
All Implemented Interfaces:
ByteChannel, GatheringByteChannel, ScatteringByteChannel, Channel, InterruptibleChannel
Since:Author:FileChannel
protected FileChannel()
Initializes the channel.
force
public void force(boolean metaData)
msync with the disk
Parameters:
implCloseChannel
protected void implCloseChannel()
Closes the channel.
This is called from @see close.
Throws:
map
public MappedByteBuffer map(java.nio.channels.FileChannel.MapMode mode, long position, long size)
Maps the file into the memory.
Parameters:
Throws:
read
public final long read(java.nio.ByteBuffer[] dsts)
Parameters:
read
public int read(java.nio.ByteBuffer dst)
Reads data from the channel.
Parameters:
size
public long size()
Return the size of the file thus far
write
public long write(java.nio.ByteBuffer[] srcs)
Writes data to the channel.
Parameters:
Throws:
write
public int write(java.nio.ByteBuffer src)
Parameters:
write
public long write(java.nio.ByteBuffer[] srcs, int offset, int length)
Writes data to the channel.
Parameters: