Class FilenameFileRegion
java.lang.Object
org.apache.mina.core.file.DefaultFileRegion
org.apache.mina.core.file.FilenameFileRegion
- All Implemented Interfaces:
FileRegion
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$
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilenameFileRegion(File file, FileChannel channel) Create a new FilenameFileRegion instanceFilenameFileRegion(File file, FileChannel channel, long position, long remainingBytes) Create a new FilenameFileRegion instance -
Method Summary
Modifier and TypeMethodDescriptionProvides an absolute filename for the underlying FileChannel.Methods inherited from class DefaultFileRegion
getFileChannel, getPosition, getRemainingBytes, getWrittenBytes, update
-
Field Details
-
file
-
-
Constructor Details
-
FilenameFileRegion
Create a new FilenameFileRegion instance- Parameters:
file- The file to managechannel- The channel over the file
-
FilenameFileRegion
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 Details
-
getFilename
Provides an absolute filename for the underlying FileChannel.- Specified by:
getFilenamein interfaceFileRegion- Overrides:
getFilenamein classDefaultFileRegion- Returns:
- the absolute filename, or
nullif the FileRegion does not know the filename
-