public FileChannel newFileChannel()

in src/main/java/org/apache/sling/commons/jcr/file/internal/JcrFileSystemProvider.java [142:157]


    public FileChannel newFileChannel(final Path path, final Set<? extends OpenOption> options, final FileAttribute<?>... attrs) throws IOException {
        logger.info("newFileChannel");
        try {
            final JcrPath jcrPath = (JcrPath) path;
            final Node node;
            if (jcrPath.toFile().exists()) {
                node = PathUtil.toNode(path);
            } else {
                node = jcrFileSupportService.newFile(path);
            }
            return new JcrFileChannel(node);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new IOException(e);
        }
    }