|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.io.TarUtils
public class TarUtils
This class contains convenience methods for taring files.
Constructor Summary | |
---|---|
TarUtils()
|
Method Summary | |
---|---|
static void |
addFolderContent(org.apache.commons.compress.archivers.ArchiveOutputStream tarOutput,
File folder,
WaitingHandler waitingHandler)
Add content to the tar file. |
static void |
extractFile(File tarFile,
WaitingHandler waitingHandler)
Extracts files from a tar. |
static void |
tarFolder(File folder,
File destinationFile,
WaitingHandler waitingHandler)
Tar a given folder in a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TarUtils()
Method Detail |
---|
public static void tarFolder(File folder, File destinationFile, WaitingHandler waitingHandler) throws FileNotFoundException, org.apache.commons.compress.archivers.ArchiveException, IOException
folder
- the original folder to tardestinationFile
- the destination filewaitingHandler
- a waiting handler used to cancel the process (can
be null)
FileNotFoundException
- exception thrown whenever a file is not
found
org.apache.commons.compress.archivers.ArchiveException
- exception thrown whenever an error occurred
while taring
IOException
- exception thrown whenever an error occurred while
reading/writing filespublic static void addFolderContent(org.apache.commons.compress.archivers.ArchiveOutputStream tarOutput, File folder, WaitingHandler waitingHandler) throws FileNotFoundException, IOException
tarOutput
- the archive output streamfolder
- the folder to addwaitingHandler
- a waiting handler used to cancel the process (can
be null)
FileNotFoundException
- exception thrown whenever a file is not
found
IOException
- exception thrown whenever an error occurred while
reading/writing filespublic static void extractFile(File tarFile, WaitingHandler waitingHandler) throws FileNotFoundException, org.apache.commons.compress.archivers.ArchiveException, IOException
tarFile
- the tar filewaitingHandler
- a waiting handler displaying progress and allowing
canceling the process
FileNotFoundException
org.apache.commons.compress.archivers.ArchiveException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |