Class 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 Detail

      • FilenameFileRegion

        public FilenameFileRegion​(File file,
                                  FileChannel channel)
        Create a new FilenameFileRegion instance
        Parameters:
        file - The file to manage
        channel - 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 manage
        channel - The channel over the file
        position - The position in teh file
        remainingBytes - The remaining bytes
    • Method Detail

      • getFilename

        public String getFilename()
        Provides an absolute filename for the underlying FileChannel.
        Specified by:
        getFilename in interface FileRegion
        Overrides:
        getFilename in class DefaultFileRegion
        Returns:
        the absolute filename, or null if the FileRegion does not know the filename