public Resource createRelative(String relativePath) throws IOException { String newPath = getPath(); // strip back the filename so that we have the container path int i = newPath.lastIndexOf("/"); newPath = newPath.substring(0,i); if (!relativePath.startsWith("/")) { newPath = newPath + "/"; } newPath = newPath + relativePath; return new StoreResource(getStore(), newPath); } }
public InputStream getInputStream() throws IOException { InputStream is = this.store.getDocument(this.path); if (is == null) { throw new FileNotFoundException("Could not open " + getDescription()); } return is; }
Resource resource = new StoreResource(apiStore, paths[i]); list.add(resource);
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StoreResource) { StoreResource otherRes = (StoreResource) obj; return (this.store.equals(otherRes.getStore()) && this.path.equals(otherRes.path)); } return false; }
Resource resource = new StoreResource(apiStore, paths[i]); list.add(resource);
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StoreResource) { StoreResource otherRes = (StoreResource) obj; return (this.store.equals(otherRes.getStore()) && this.path.equals(otherRes.path)); } return false; }
public Resource createRelative(String relativePath) throws IOException { String newPath = getPath(); // strip back the filename so that we have the container path int i = newPath.lastIndexOf("/"); newPath = newPath.substring(0,i); if (!relativePath.startsWith("/")) { newPath = newPath + "/"; } newPath = newPath + relativePath; return new StoreResource(getStore(), newPath); } }
logger.debug("Found Spring Resource '" + location + " in store: " + apiStore.getClass().getSimpleName() + "(" + apiStore.getBasePath() + ")"); resource = new StoreResource(apiStore, path);
public InputStream getInputStream() throws IOException { InputStream is = this.store.getDocument(this.path); if (is == null) { throw new FileNotFoundException("Could not open " + getDescription()); } return is; }
logger.debug("Found Spring Resource '" + location + " in store: " + apiStore.getClass().getSimpleName() + "(" + apiStore.getBasePath() + ")"); resource = new StoreResource(apiStore, path);