/** * @see org.springframework.core.io.Resource#exists() */ public boolean exists() { return this.source.exists(); }
/** * @see org.apache.excalibur.source.Source#exists() */ public boolean exists() { return this.source.exists(); }
/** * @see org.apache.excalibur.source.Source#exists() */ public boolean exists() { return this.wrappedSource.exists(); }
if (source.exists())
try { source = resolver.resolveURI(url); result = source.exists(); } catch (IOException e) { result = false;
public boolean exists() { if(!this.archive.exists()) { return false; } ZipInputStream zipStream = null; try { zipStream = new ZipInputStream(this.archive.getInputStream()); return findEntry(zipStream) != null; } catch (IOException e) { return false; } finally { try { if (zipStream != null) { zipStream.close(); } } catch (IOException e) { getLogger().error("IOException while closing ZipInputStream: " + this.filePath); } } }
/** * @see IncludeCacheStorageProxy#get(java.lang.String) */ public Serializable get(String uri) { if (getLogger().isDebugEnabled()) { getLogger().debug("WSCProxy: Getting content for " + uri); } Source child = null; Serializable result = null; try { child = this.resolver.resolveURI(this.getURI(uri)); if (getLogger().isDebugEnabled()) { getLogger().debug("WSCProxy: Resolved to " + child.getURI()); } if (child.exists()) { InputStream is = child.getInputStream(); ObjectInputStream ois = new ObjectInputStream(is); result = (Serializable)ois.readObject(); ois.close(); } } catch (Exception ignore) { } finally { this.resolver.release( child ); } if (getLogger().isDebugEnabled()) { getLogger().debug("WSCProxy: Result for " + uri + " : " + (result == null ? "Not in cache" : "Found")); } return result; }
public SourceMeta(Source source) { setExists(source.exists()); if (exists()) { setContentLength(source.getContentLength()); final long lastModified = source.getLastModified(); if (lastModified > 0) { setLastModified(lastModified); } else { setLastModified(System.currentTimeMillis()); } setMimeType(source.getMimeType()); } else { contentLength = -1; } }