/** * Retrieve the NIO channel that corresponds to this file. * * @return the file channel. */ private FileChannel getFileChannel() throws FileNotFoundException { if (channel == null) { RandomAccessFile file = new RandomAccessFile(getPath(), mode); channel = file.getChannel(); } return channel; }
@RolesAllowed("user") public boolean exists() { errorIfNotLoaded(); return new File(buffer.getPath()).exists(); }
final String path = buffer.getPath();