|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Proc
org.basex.io.Zip
public final class Zip
Contains methods for zipping and unzipping archives.
Field Summary |
---|
Fields inherited from class org.basex.core.Proc |
---|
listen, updating |
Constructor Summary | |
---|---|
Zip(IO file)
Constructor. |
Method Summary | |
---|---|
static byte[] |
getEntry(java.util.zip.ZipInputStream in,
java.lang.String entry)
Returns the contents of the specified entry, or null . |
protected double |
prog()
Returns a progress value (0 - 1). |
byte[] |
read(java.lang.String path)
Returns the contents of a zip file entry. |
void |
unzip(IOFile target)
Unzips the archive to the specified directory. |
void |
zip(IOFile root,
StringList files)
Zips the specified files. |
Methods inherited from class org.basex.core.Proc |
---|
abort, checkStop, databases, det, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Zip(IO file)
file
- archive fileMethod Detail |
---|
public byte[] read(java.lang.String path) throws java.io.IOException
path
- file to be read
java.io.IOException
- I/O exceptionpublic void unzip(IOFile target) throws java.io.IOException
target
- target path
java.io.IOException
- I/O exceptionpublic void zip(IOFile root, StringList files) throws java.io.IOException
root
- root directoryfiles
- files to add
java.io.IOException
- I/O exceptionprotected double prog()
Proc
prog
in class Proc
public static byte[] getEntry(java.util.zip.ZipInputStream in, java.lang.String entry) throws java.io.IOException
null
.
in
- input streamentry
- entry to be found
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |