Keep a reference to the provided
FileInputStream around in order
to be able to close it when it is fed to
FilesystemImpl.returnFile(ReadableByteChannel) .
Parameters: fc - the channel associated with the stream. Parameters: fis - the stream to keep around.
Tries to make sure that the provided path lives somewhere inside
m_rootDirectory}. Parameters: absolutePath - the path to check for location validity. throws: SecurityException - if the file does not live insidethe root directory.
Retrieve a
FileChannel pointing to the provided file.
Parameters: file - the file to retrieve the associated FileChannelfor. the FileChannel pointing to the provided file. throws: FileNotFoundException - if the specified file cannot be found,the provided path points to a directory or to a file from whichcannot be read. throws: SecurityException - if access to the file is denied.
Transform a path relative to the root directory to a
File .
Parameters: relativePath - the path to transform. a File instance pointing to the specified path. throws: FileNotFoundException - if the specified file cannot be found,the provided path points to a directory or to a file from whichcannot be read. throws: SecurityException - if access to the file is denied.
Transform a path relative to the root directory to an absolute path.
Parameters: relativePath - the path to transform. an absolute path to the same location. throws: SecurityException - if access to the file is denied.