@Override public boolean exists() { return VfsUtils.exists(this.resource); }
@Override public Resource createRelative(String relativePath) throws IOException { if (!relativePath.startsWith(".") && relativePath.contains("/")) { try { return new VfsResource(VfsUtils.getChild(this.resource, relativePath)); } catch (IOException ex) { // fall back to getRelative } } return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath))); }
@Override public File getFile() throws IOException { return VfsUtils.getFile(this.resource); }
public static Resource getResource(URI uri) throws IOException { return new VfsResource(VfsUtils.getRoot(uri)); } }
@Override public URI getURI() throws IOException { try { return VfsUtils.getURI(this.resource); } catch (Exception ex) { throw new NestedIOException("Failed to obtain URI for " + this.resource, ex); } }
@Override public long contentLength() throws IOException { return VfsUtils.getSize(this.resource); }
@Override public String getFilename() { return VfsUtils.getName(this.resource); }
@Override public InputStream getInputStream() throws IOException { return VfsUtils.getInputStream(this.resource); }
@Override public long lastModified() throws IOException { return VfsUtils.getLastModified(this.resource); }
public static Resource getResource(URL url) throws IOException { return new VfsResource(VfsUtils.getRoot(url)); }
@Override public URI getURI() throws IOException { try { return VfsUtils.getURI(this.resource); } catch (Exception ex) { throw new NestedIOException("Failed to obtain URI for " + this.resource, ex); } }
@Override public long contentLength() throws IOException { return VfsUtils.getSize(this.resource); }
@Override public String getFilename() { return VfsUtils.getName(this.resource); }
@Override public InputStream getInputStream() throws IOException { return VfsUtils.getInputStream(this.resource); }
@Override public long lastModified() throws IOException { return VfsUtils.getLastModified(this.resource); }
@Override public Resource createRelative(String relativePath) throws IOException { if (!relativePath.startsWith(".") && relativePath.contains("/")) { try { return new VfsResource(VfsUtils.getChild(this.resource, relativePath)); } catch (IOException ex) { // fall back to getRelative } } return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath))); }
public static Resource getResource(URI uri) throws IOException { return new VfsResource(VfsUtils.getRoot(uri)); } }
@Override public URI getURI() throws IOException { try { return VfsUtils.getURI(this.resource); } catch (Exception ex) { throw new NestedIOException("Failed to obtain URI for " + this.resource, ex); } }
@Override public boolean exists() { return VfsUtils.exists(this.resource); }
@Override public long contentLength() throws IOException { return VfsUtils.getSize(this.resource); }