Package org.apache.mina.core.file
Class FilenameFileRegion
- java.lang.Object
-
- org.apache.mina.core.file.DefaultFileRegion
-
- org.apache.mina.core.file.FilenameFileRegion
-
- All Implemented Interfaces:
FileRegion
public class FilenameFileRegion extends DefaultFileRegion
Manage a File to be sent to a remote host. We keep a track on the current position, and the number of already written bytes.- Version:
- $Rev$, $Date$
- Author:
- The Apache MINA Project (dev@mina.apache.org)
-
-
Constructor Summary
Constructors Constructor Description FilenameFileRegion(File file, FileChannel channel)
Create a new FilenameFileRegion instanceFilenameFileRegion(File file, FileChannel channel, long position, long remainingBytes)
Create a new FilenameFileRegion instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFilename()
Provides an absolute filename for the underlying FileChannel.-
Methods inherited from class org.apache.mina.core.file.DefaultFileRegion
getFileChannel, getPosition, getRemainingBytes, getWrittenBytes, update
-
-
-
-
Constructor Detail
-
FilenameFileRegion
public FilenameFileRegion(File file, FileChannel channel)
Create a new FilenameFileRegion instance- Parameters:
file
- The file to managechannel
- The channel over the file
-
FilenameFileRegion
public FilenameFileRegion(File file, FileChannel channel, long position, long remainingBytes)
Create a new FilenameFileRegion instance- Parameters:
file
- The file to managechannel
- The channel over the fileposition
- The position in teh fileremainingBytes
- The remaining bytes
-
-
Method Detail
-
getFilename
public String getFilename()
Provides an absolute filename for the underlying FileChannel.- Specified by:
getFilename
in interfaceFileRegion
- Overrides:
getFilename
in classDefaultFileRegion
- Returns:
- the absolute filename, or null if the FileRegion does not know the filename
-
-