|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.netty.channel.DefaultFileRegion
public class DefaultFileRegion
Constructor Summary | |
---|---|
DefaultFileRegion(FileChannel file,
long position,
long count)
|
Method Summary | |
---|---|
long |
getCount()
Returns the number of bytes to transfer. |
long |
getPosition()
Returns the offset in the file where the transfer began. |
void |
releaseExternalResources()
Releases the external resources that this object depends on. |
long |
transferTo(WritableByteChannel target,
long position)
Transfers the content of this file region to the specified channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFileRegion(FileChannel file, long position, long count)
Method Detail |
---|
public long getPosition()
FileRegion
getPosition
in interface FileRegion
public long getCount()
FileRegion
getCount
in interface FileRegion
public long transferTo(WritableByteChannel target, long position) throws IOException
FileRegion
transferTo
in interface FileRegion
target
- the destination of the transferposition
- the relative offset of the file where the transfer
begins from. For example, 0 will make the
transfer start from FileRegion.getPosition()
th byte and
FileRegion.getCount()
- 1 will make the last
byte of the region transferred.
IOException
public void releaseExternalResources()
ExternalResourceReleasable
releaseExternalResources
in interface ExternalResourceReleasable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |