Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COMPRESSION |
Constructor and Description |
---|
ZipUtils() |
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 destination,
boolean overwrite,
EventMetaI ci) |
int |
getCompressionMethod() |
boolean |
getDecompressFilesBeforeZipping() |
List<String> |
getDuplicates() |
void |
setCompressionMethod(int compressionMethod) |
void |
setDecompressFilesBeforeZipping(boolean method) |
void |
setOutputStream(OutputStream outStream) |
void |
setOutputStream(OutputStream outStream,
int compressionMethod) |
static void |
Unzip(File f) |
void |
write(String relativePath,
File f) |
void |
write(String relativePath,
InputStream is) |
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 static final int DEFAULT_COMPRESSION
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 void setCompressionMethod(int compressionMethod)
setCompressionMethod
in interface ZipI
compressionMethod
- The _compressionMethod to set.public void write(String relativePath, String absolutePath) throws IOException
write
in interface ZipI
relativePath
- path name for zip fileabsolutePath
- Absolute path used to load file.FileNotFoundException
IOException
public void write(String relativePath, File f) throws IOException
write
in interface ZipI
relativePath
- path name for zip filef
- FileNotFoundException
IOException
public void write(String relativePath, InputStream is) throws IOException
write
in interface ZipI
relativePath
- Path name for zip fileis
- File name for zip fileIOException
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 void extract(File f, String dir, boolean deleteZip) throws IOException
extract
in interface ZipI
IOException
public ArrayList extract(InputStream is, String dir) throws IOException
extract
in interface ZipI
IOException
public ArrayList extract(InputStream is, String destination, boolean overwrite, EventMetaI ci) throws IOException
extract
in interface ZipI
IOException
public static void Unzip(File f) throws IOException
IOException
public void writeDirectory(File dir) throws IOException
writeDirectory
in interface ZipI
dir
- Path for directory.IOException
public int getCompressionMethod()
getCompressionMethod
in interface ZipI
public boolean getDecompressFilesBeforeZipping()
getDecompressFilesBeforeZipping
in interface ZipI
public void setDecompressFilesBeforeZipping(boolean method)
setDecompressFilesBeforeZipping
in interface ZipI
method
- The _compressionMethod to set.public List<String> getDuplicates()
getDuplicates
in interface ZipI
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.