code: public InputStream getAsStream() throws CacheException {
  		try {
  			if(file.exists() && file.isFile()) {
  				logger.debug("retrieving file as a stream");
  				return new FileInputStream(file);			
  			}
  		} catch(IOException e) {
  			logger.error("file '{}' does not exist or is not a file", file.getAbsolutePath());
  			throw new CacheException("File " + file.getAbsolutePath() + " does not exist or is not a regular file", e);
  		}		
  		return null;
  	}
docs: Returns the given file as a stream.