readFromTar(remote + '/' + description,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn())); } catch (IOException e) {// BuildException or IOException try {
@Override public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { return writeToTar(new File(remote), scanner, TarCompression.GZIP.compress(pipe.getOut())); } }
remoteCompressionType.compress(pipe.getOut()) : FilePath.TarCompression.GZIP.compress(pipe.getOut()))); try { future.get(); (remoteCompressionType != null? remoteCompressionType.extract(pipe.getIn()) : FilePath.TarCompression.GZIP.extract(pipe.getIn()))); } catch (IOException e) {// BuildException or IOException try {
remoteCompressionType.compress(pipe.getOut()) : FilePath.TarCompression.GZIP.compress(pipe.getOut()))); try { future.get(); (remoteCompressionType != null? remoteCompressionType.extract(pipe.getIn()) : FilePath.TarCompression.GZIP.extract(pipe.getIn()))); } catch (IOException e) {// BuildException or IOException try {
remoteCompressionType.compress(pipe.getOut()) : FilePath.TarCompression.GZIP.compress(pipe.getOut()))); try { future.get(); (remoteCompressionType != null? remoteCompressionType.extract(pipe.getIn()) : FilePath.TarCompression.GZIP.extract(pipe.getIn()))); } catch (IOException e) {// BuildException or IOException try {
? remoteCompressionType.compress(pipe.getOut()) : FilePath.TarCompression.GZIP.compress(pipe.getOut()))); try { future.get(); (remoteCompressionType != null ? remoteCompressionType.extract(pipe.getIn()) : FilePath.TarCompression.GZIP.extract(pipe.getIn())), nativeUtils); } catch (IOException e) { // BuildException or IOException try {
readFromTar(remote + '/' + description,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn())); } catch (IOException e) {// BuildException or IOException try {
int r = writeToTar(new File(source.getRemote()), includes, excludes, includeAntExcludes, TarCompression.GZIP.compress(pipe.getOut())); try { future.get();
@Restricted(DoNotUse.class) // currently just for tests @SuppressFBWarnings(value="DM_DEFAULT_ENCODING", justification="test code") public static Map<String,Map<String,String>> stashesOf(@Nonnull Run<?,?> build) throws IOException { Map<String,Map<String,String>> result = new TreeMap<String,Map<String,String>>(); File[] kids = storage(build).listFiles(); if (kids != null) { for (File kid : kids) { String n = kid.getName(); if (n.endsWith(SUFFIX)) { Map<String,String> unpacked = new TreeMap<String,String>(); result.put(n.substring(0, n.length() - SUFFIX.length()), unpacked); InputStream is = new FileInputStream(kid); try { InputStream wrapped = FilePath.TarCompression.GZIP.extract(is); TarInputStream tis = new TarInputStream(wrapped); TarEntry te; while ((te = tis.getNextEntry()) != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); IOUtils.copy(tis, baos); unpacked.put(te.getName(), baos.toString()); } } finally { is.close(); } } } } return result; }
@Override public Void invoke(File dir, VirtualChannel channel) throws IOException, InterruptedException { try (InputStream in = archive.openStream()) { CountingInputStream cis = new CountingInputStream(in); try { if (archive.toExternalForm().endsWith(".zip")) { unzip(dir, cis); } else { readFromTar("input stream", dir, GZIP.extract(cis)); } } catch (IOException x) { throw new IOException(String.format("Failed to unpack %s (%d bytes read)", archive, cis.getByteCount()), x); } } return null; } }
public Archiver create(OutputStream out) throws IOException { return new TarArchiver(method.compress(out)); }
public Archiver create(OutputStream out) throws IOException { return new TarArchiver(method.compress(out)); }
public Archiver create(OutputStream out) throws IOException { return new TarArchiver(method.compress(out)); }
/** * Sets compression type. * * @param compression compression type. */ public void setCompressionType(String compression) { try { compressionType = (compression != null ? FilePath.TarCompression.valueOf( compression) : FilePath.TarCompression.GZIP); } catch (IllegalArgumentException e) { compressionType = FilePath.TarCompression.GZIP; } }
/** * Sets compression type. * * @param compression compression type. */ public void setCompressionType(String compression) { try { compressionType = (compression != null ? FilePath.TarCompression.valueOf( compression) : FilePath.TarCompression.GZIP); } catch (IllegalArgumentException e) { compressionType = FilePath.TarCompression.GZIP; } }
/** * Sets compression type. * * @param compression compression type. */ public void setCompressionType(String compression) { try { compressionType = (compression != null ? FilePath.TarCompression.valueOf(compression) : FilePath.TarCompression.GZIP); } catch (IllegalArgumentException e) { compressionType = FilePath.TarCompression.GZIP; } }
@Override public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { return writeToTar(new File(remote), scanner, TarCompression.GZIP.compress(pipe.getOut())); } });
public Archiver create(OutputStream out) throws IOException { return new TarArchiver(method.compress(out)); }
public Void invoke(File dir, VirtualChannel channel) throws IOException, InterruptedException { readFromTar(FilePath.this.getName(),dir,compression.extract(in)); return null; }
public Void invoke(File dir, VirtualChannel channel) throws IOException { readFromTar("input stream",dir, compression.extract(in)); return null; } private static final long serialVersionUID = 1L;