com.compomics.util.io
Class TarUtils
java.lang.Object
com.compomics.util.io.TarUtils
public class TarUtils
- extends Object
This class contains convenience methods for taring files.
- Author:
- Marc Vaudel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TarUtils
public TarUtils()
tarFolder
public static void tarFolder(File folder,
File destinationFile,
WaitingHandler waitingHandler)
throws FileNotFoundException,
org.apache.commons.compress.archivers.ArchiveException,
IOException
- Tar a given folder in a file.
- Parameters:
folder
- the original folder to tardestinationFile
- the destination filewaitingHandler
- a waiting handler used to cancel the process (can
be null)
- Throws:
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 files
addFolderContent
public static void addFolderContent(org.apache.commons.compress.archivers.ArchiveOutputStream tarOutput,
File folder,
WaitingHandler waitingHandler)
throws FileNotFoundException,
IOException
- Add content to the tar file.
- Parameters:
tarOutput
- the archive output streamfolder
- the folder to addwaitingHandler
- a waiting handler used to cancel the process (can
be null)
- Throws:
FileNotFoundException
- exception thrown whenever a file is not
found
IOException
- exception thrown whenever an error occurred while
reading/writing files
Copyright © 2012. All Rights Reserved.