/** * Return the inputstream from from cache, or null if not in the cache. * * @param fileName name of file. * @return stream or null. */ public InputStream getIfStored(String fileName) throws IOException { File file = getFileIfStored(fileName); return file == null ? null : new LazyFileInputStream(file); }
/** * Return the inputstream from from cache, or null if not in the cache. * * @param fileName name of file. * @return stream or null. */ public InputStream getIfStored(String fileName) throws IOException { File file = getFileIfStored(fileName); return file == null ? null : new LazyFileInputStream(file); }
/** * Return the inputstream from from cache, or null if not in the cache. * * @param fileName name of file. * @return stream or null. */ public InputStream getIfStored(String fileName) throws IOException { File file = getFileIfStored(fileName); return file == null ? null : new LazyFileInputStream(file); }
/** * Returns length of file if exists in cache else returns null. * @param fileName name of the file. */ public Long getFileLength(String fileName) { Long length = null; try { length = cache.get(fileName); if( length == null ) { File f = getFileIfStored(fileName); if (f != null) { length = f.length(); } } } catch (IOException ignore) { } return length; }
/** * Returns length of file if exists in cache else returns null. * @param fileName name of the file. */ public Long getFileLength(String fileName) { Long length = null; try { length = cache.get(fileName); if( length == null ) { File f = getFileIfStored(fileName); if (f != null) { length = f.length(); } } } catch (IOException ignore) { } return length; }
/** * Returns length of file if exists in cache else returns null. * @param fileName name of the file. */ public Long getFileLength(String fileName) { Long length = null; try { length = cache.get(fileName); if( length == null ) { File f = getFileIfStored(fileName); if (f != null) { length = f.length(); } } } catch (IOException ignore) { } return length; }