/** * Get a {@link FileBuffer} corresponding to this instance. * It is the caller's responsibility to {@link FileBuffer#close()} it. * @param mode as for {@link java.io.RandomAccessFile#RandomAccessFile(File, String)}, * <code>"r"</code> and <code>"rw"</code> being common choices * @return a new {@link FileBuffer} */ public FileBuffer getFileBuffer(String mode) { return new FileBuffer(this.file.getPath(), mode); }
/** * Returns FileBuffer based on OriginalFile path * * @param file * @return FileBuffer */ public FileBuffer getFileBuffer(OriginalFile file, String mode) { String path = getFilesPath(file.getId()); createSubpath(path); return new FileBuffer(path, mode); }