|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.core.file.DefaultFileRegion
public class DefaultFileRegion
TODO Add documentation
Constructor Summary | |
---|---|
DefaultFileRegion(java.nio.channels.FileChannel channel)
|
|
DefaultFileRegion(java.nio.channels.FileChannel channel,
long position,
long remainingBytes)
|
Method Summary | |
---|---|
java.nio.channels.FileChannel |
getFileChannel()
The open FileChannel from which data will be read to send to remote host. |
java.lang.String |
getFilename()
Provides an absolute filename for the underlying FileChannel. |
long |
getPosition()
The current file position from which data will be read. |
long |
getRemainingBytes()
The number of bytes remaining to be written from the file to the remote host. |
long |
getWrittenBytes()
The total number of bytes already written. |
void |
update(long value)
Updates the current file position based on the specified amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFileRegion(java.nio.channels.FileChannel channel) throws java.io.IOException
java.io.IOException
public DefaultFileRegion(java.nio.channels.FileChannel channel, long position, long remainingBytes)
Method Detail |
---|
public long getWrittenBytes()
FileRegion
getWrittenBytes
in interface FileRegion
public long getRemainingBytes()
FileRegion
getRemainingBytes
in interface FileRegion
public java.nio.channels.FileChannel getFileChannel()
FileRegion
getFileChannel
in interface FileRegion
public long getPosition()
FileRegion
getPosition
in interface FileRegion
public void update(long value)
FileRegion
FileRegion.getPosition()
and
getWrittenBytes
by the given amount and decreases the value
returned by #getCount()
by the given amount
.
update
in interface FileRegion
value
- The new value for the file position.public java.lang.String getFilename()
FileRegion
getFilename
in interface FileRegion
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |