|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jomic.tools.FileArchive
public class FileArchive
An archive containing files. Currently supported formats are ZIP and RAR.
For hints and implementation details on various archive formats, see for example Marco Schmidt's list of archive file formats and archivers .
| Constructor Summary | |
|---|---|
FileArchive(File newFile)
|
|
| Method Summary | |
|---|---|
void |
extract(File targetDir,
String[] fileNamesToExtract)
|
void |
extract(File targetDir,
String[] fileNamesToExtract,
ProgressFrame progressFrame,
long progressIncrement)
Extract to targetDir all files in fileNamesToExtract. |
String |
getBaseName()
Get the plain name of the archive file, without directory and suffix. |
String |
getFileType()
Get the file type of the archive. |
String[] |
list()
|
void |
removeExtracted(File targetDir)
Attempt to remove all files that could have been extracted from the archive to targetDir
. |
void |
setUnrarCommand(String newUnrarCommand)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileArchive(File newFile)
throws IOException
IOException| Method Detail |
|---|
public void setUnrarCommand(String newUnrarCommand)
public String getBaseName()
public String getFileType()
public void extract(File targetDir,
String[] fileNamesToExtract,
ProgressFrame progressFrame,
long progressIncrement)
throws IOException,
InterruptedException
targetDir all files in fileNamesToExtract. If progressFrame
is not null, advance its progress bar by progressIncrement for every file that
is extracted.
IOException
InterruptedException
public void extract(File targetDir,
String[] fileNamesToExtract)
throws IOException,
InterruptedException
IOException
InterruptedException
public String[] list()
throws IOException,
InterruptedException
IOException
InterruptedException
public void removeExtracted(File targetDir)
throws IOException,
InterruptedException
targetDir
. If a file cannot be removed, log a warning and continue.
IOException
InterruptedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||