/** * A gunzip function to store locally * * @param in The factory to produce input streams * @param outFile The file to store the result into * @param shouldRetry A predicate to indicate if the Throwable is recoverable * * @return The count of bytes written to outFile */ public static FileUtils.FileCopyResult gunzip( final ByteSource in, final File outFile, Predicate<Throwable> shouldRetry ) { return FileUtils.retryCopy( new ByteSource() { @Override public InputStream openStream() throws IOException { return gzipInputStream(in.openStream()); } }, outFile, shouldRetry, DEFAULT_RETRY_COUNT ); }
final ZipEntry entry = enumeration.nextElement(); result.addFiles( FileUtils.retryCopy( new ByteSource()
final File tmpFile = File.createTempFile("compressionUtilZipCache", ZIP_SUFFIX); try { FileUtils.retryCopy( byteSource, tmpFile,
FileUtils.retryCopy( Files.asByteSource(oldFile), new File(dir, oldFile.getName()),