org.apache.mina.common
Interface FileRegion

All Known Implementing Classes:
DefaultFileRegion

public interface FileRegion

Indicates the region of a file to be sent to the remote host.

Version:
$Rev: 560320 $, $Date: 2007-07-27 11:12:26 -0600 (Fri, 27 Jul 2007) $,
Author:
The Apache MINA Project (dev@mina.apache.org)

Method Summary
 long getCount()
          The number of bytes to be written from the file to the remote host.
 FileChannel getFileChannel()
          The open FileChannel from which data will be read to send to remote host.
 long getPosition()
          The current file position from which data will be read.
 long getWrittenBytes()
          The total number of bytes already written.
 void setPosition(long value)
          Updates the current file position.
 

Method Detail

getFileChannel

FileChannel getFileChannel()
The open FileChannel from which data will be read to send to remote host.

Returns:
An open FileChannel.

getPosition

long getPosition()
The current file position from which data will be read.

Returns:
The current file position.

setPosition

void setPosition(long value)
Updates the current file position. May not be negative.

Parameters:
value - The new value for the file position.

getCount

long getCount()
The number of bytes to be written from the file to the remote host.

Returns:
The number of bytes to be written.

getWrittenBytes

long getWrittenBytes()
The total number of bytes already written.

Returns:
The total number of bytes already written.


Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.