@Override public Path visitPathResource(final PathResourceReference pathResourceReference) throws URISyntaxException { return pathResourceReference.getPath(); } });
@Override public File visitPathResource(final PathResourceReference pathResourceReference) throws URISyntaxException { return pathResourceReference.getPath().toFile(); } });
@Override public OutputStream visitPathResource(final PathResourceReference pathResourceReference) throws IOException { return Files.newOutputStream(pathResourceReference.getPath()); } });
@Override public Boolean visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return Files.exists(pathResourceReference.getPath()); } }).booleanValue();
@Override public File visitPathResource(final PathResourceReference pathResourceReference) throws URISyntaxException { return pathResourceReference.getPath().toFile(); } });
@Override public URI visitPathResource(final PathResourceReference pathResourceReference) throws URISyntaxException { return pathResourceReference.getPath().toUri(); } });
@Override public Boolean visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return Files.isReadable(pathResourceReference.getPath()); } }).booleanValue();
@Override public OutputStream visitPathResource(final PathResourceReference pathResourceReference) throws IOException { return Files.newOutputStream(pathResourceReference.getPath()); } });
@Override public Boolean visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return Files.exists(pathResourceReference.getPath()); } }).booleanValue();
@Override public URI visitPathResource(final PathResourceReference pathResourceReference) throws URISyntaxException { return pathResourceReference.getPath().toUri(); } });
@Override public Long visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { try { return Files.size(pathResourceReference.getPath()); } catch (final IOException exception) { return Long.valueOf(-1l); } } }).longValue();
@Override public Long visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { try { return Files.size(pathResourceReference.getPath()); } catch (final IOException exception) { return Long.valueOf(-1l); } } }).longValue();
@Override public IConnectionDescription visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return new FileConnectionDescription(pathResourceReference.getPath().toFile().toURI()); } });
@Override public String visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return FileUtilities.getExtension(pathResourceReference.getPath().toFile()); }
@Override public Boolean visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return Files.isWritable(pathResourceReference.getPath()); } }).booleanValue();
@Override public URL visitPathResource(final PathResourceReference pathResourceReference) throws MalformedURLException { return uriToUrlConverter.convert(pathResourceReference.getPath().toUri()); } });
@Override public URL visitPathResource(final PathResourceReference pathResourceReference) throws MalformedURLException { return uriToUrlConverter.convert(pathResourceReference.getPath().toUri()); } });
@Override public InputStream visitPathResource(final PathResourceReference pathResourceReference) throws IOException { final String contentType = Files.probeContentType(pathResourceReference.getPath()); if (!contentTypeAcceptor.accept(contentType)) { throw new IOException("Unexcepted mime type '" + contentType + "'"); //$NON-NLS-1$//$NON-NLS-2$ } return Files.newInputStream(pathResourceReference.getPath()); }
@Override public Boolean visitPathResource(final PathResourceReference pathResourceReference) throws RuntimeException { return Files.isWritable(pathResourceReference.getPath()); } }).booleanValue();
@Override public InputStream visitPathResource(final PathResourceReference pathResourceReference) throws IOException { final String contentType = Files.probeContentType(pathResourceReference.getPath()); if (!contentTypeAcceptor.accept(contentType)) { throw new IOException("Unexcepted mime type '" + contentType + "'"); //$NON-NLS-1$//$NON-NLS-2$ } return Files.newInputStream(pathResourceReference.getPath()); }