public InputStream getInputStream() throws IOException { InputStream istream = resource.getInputStream(); if (istream == null) { throw new IOException(getDescription() + " cannot be resolved as InputStream"); } return istream; }
@Override public File getFile() throws IOException { File file = resource.getFile(); if (file == null) { throw new IOException(getDescription() + " cannot be resolved as File"); } return file; }
@Override public URL getURL() throws IOException { URL url = resource.getURL(); if (url == null) { throw new IOException(getDescription() + " cannot be resolved as URL"); } return url; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } ResourceAdapter other = (ResourceAdapter) obj; if (resource == null) { if (other.resource != null) { return false; } } else if (!resource.equals(other.resource)) { return false; } return true; }
@Override public boolean exists() { return resource.exists(); }
@Override public int hashCode() { return 31 + (resource == null ? 0 : resource.hashCode()); }
@Override public long lastModified() { return resource.lastModified(); }