@Override public SeekableByteChannel newByteChannel( Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { JimfsPath checkedPath = checkPath(path); JimfsFileChannel channel = newJimfsFileChannel(checkedPath, options, attrs); return checkedPath.getJimfsFileSystem().getFileStore().supportsFeature(FILE_CHANNEL) ? channel : new DowngradedSeekableByteChannel(channel); }
@Override public SeekableByteChannel newByteChannel( Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { JimfsPath checkedPath = checkPath(path); JimfsFileChannel channel = newJimfsFileChannel(checkedPath, options, attrs); return checkedPath.getJimfsFileSystem().getFileStore().supportsFeature(FILE_CHANNEL) ? channel : new DowngradedSeekableByteChannel(channel); }