Constructor and Description |
---|
TarUtils() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
extract(File f,
String dir,
boolean deleteZip) |
ArrayList |
extract(InputStream is,
String dir) |
ArrayList |
extract(InputStream is,
String dir,
boolean overwrite,
EventMetaI ci) |
int |
getCompressionMethod() |
boolean |
getDecompressFilesBeforeZipping() |
List<String> |
getDuplicates() |
void |
setCompressionMethod(int method) |
void |
setDecompressFilesBeforeZipping(boolean method) |
void |
setOutputStream(OutputStream outStream) |
void |
setOutputStream(OutputStream outStream,
int compressionMethod) |
File |
unGzip(File f,
String dir,
boolean deleteZip) |
void |
write(String relativePath,
File file) |
void |
write(String relativePath,
InputStream in) |
void |
write(String relativePath,
edu.sdsc.grid.io.srb.SRBFile srb) |
void |
write(String relativePath,
String absolutePath) |
void |
write(org.nrg.xnat.srb.XNATDirectory dir) |
void |
writeDirectory(File dir) |
public void setOutputStream(OutputStream outStream) throws IOException
setOutputStream
in interface ZipI
IOException
public void setOutputStream(OutputStream outStream, int compressionMethod) throws IOException
setOutputStream
in interface ZipI
IOException
public ArrayList extract(InputStream is, String dir) throws IOException
extract
in interface ZipI
IOException
public ArrayList extract(InputStream is, String dir, boolean overwrite, EventMetaI ci) throws IOException
extract
in interface ZipI
IOException
public List<String> getDuplicates()
getDuplicates
in interface ZipI
public void extract(File f, String dir, boolean deleteZip) throws IOException
extract
in interface ZipI
IOException
public File unGzip(File f, String dir, boolean deleteZip) throws IOException
IOException
public void write(String relativePath, String absolutePath) throws FileNotFoundException, IOException
write
in interface ZipI
relativePath
- path name for zip fileabsolutePath
- Absolute path used to load file.FileNotFoundException
IOException
public void write(String relativePath, InputStream in) throws IOException
write
in interface ZipI
relativePath
- path name for zip filein
- The input stream.FileNotFoundException
IOException
public void write(String relativePath, File file) throws IOException
write
in interface ZipI
relativePath
- path name for zip filefile
- The fileFileNotFoundException
IOException
public void writeDirectory(File dir) throws IOException
writeDirectory
in interface ZipI
dir
- Path for directory.IOException
public void write(String relativePath, edu.sdsc.grid.io.srb.SRBFile srb) throws IOException
IOException
public void write(org.nrg.xnat.srb.XNATDirectory dir) throws IOException
write
in interface ZipI
dir
- Directory to write into.IOException
public void close() throws IOException
close
in interface ZipI
IOException
public int getCompressionMethod()
getCompressionMethod
in interface ZipI
public void setCompressionMethod(int method)
setCompressionMethod
in interface ZipI
method
- The _compressionMethod to set.public boolean getDecompressFilesBeforeZipping()
getDecompressFilesBeforeZipping
in interface ZipI
public void setDecompressFilesBeforeZipping(boolean method)
setDecompressFilesBeforeZipping
in interface ZipI
method
- The _compressionMethod to set.Copyright © 2015 Neuroinformatics Research Group. All rights reserved.