ReadableByteChannel getReadChannel(AnyLongObjectId id) throws IOException { return FileChannel.open(getPath(id), StandardOpenOption.READ); }
ReadableByteChannel getReadChannel(AnyLongObjectId id) throws IOException { return FileChannel.open(getPath(id), StandardOpenOption.READ); }
/** {@inheritDoc} */ @Override public long getSize(AnyLongObjectId id) throws IOException { Path p = getPath(id); if (Files.exists(p)) { return Files.size(p); } else { return -1; } }
@Override public long getSize(AnyLongObjectId id) throws IOException { Path p = getPath(id); if (Files.exists(p)) { return Files.size(p); } else { return -1; } }
AtomicObjectOutputStream getOutputStream(AnyLongObjectId id) throws IOException { Path path = getPath(id); Path parent = path.getParent(); if (parent != null) { Files.createDirectories(parent); } return new AtomicObjectOutputStream(path, id); }
AtomicObjectOutputStream getOutputStream(AnyLongObjectId id) throws IOException { Path path = getPath(id); Path parent = path.getParent(); if (parent != null) { Files.createDirectories(parent); } return new AtomicObjectOutputStream(path, id); }