|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.util.zip.ZipReader
public class ZipReader
class to read a zip file or stream
| Constructor Summary | |
|---|---|
ZipReader(File file)
|
|
ZipReader(InputStream inStream)
|
|
ZipReader(String fileName)
|
|
| Method Summary | |
|---|---|
void |
buffer()
|
Vector<ZipEntry> |
getEntries()
get the vector of zip entries |
ZipEntry |
getEntry(String urlString)
get an entry by name - note that we need to buffer the entire file for this random access method |
InputStream |
getInputStream()
get the stream to read this from; note that we must close manually |
JDFDoc |
getJDFDoc()
get the xmlDoc of the current entry - note not threadsafe! |
ZipEntry |
getMatchingEntry(String expr,
int iSkip)
get an entry by name - note that we need to buffer the entire file for this random access method |
ZipEntry |
getNextEntry()
get the next entry - this can be used in non-buffered mode returns null in case of snafu |
String |
getRootEntry()
Getter for rootEntry name attribute. |
XMLDoc |
getXMLDoc()
get the xmlDoc of the current entry - note not threadsafe! |
boolean |
isCaseSensitive()
return true if all checks are cese sensitive (the default) |
void |
setCaseSensitive(boolean caseSensitive)
set the case sensitivity for matching strings and regexp |
void |
setRootEntry(String rootEntry)
Setter for rootEntry attribute. use this to allow local searches relative to rootEntry |
String |
toString()
|
int |
unPack(File dir)
unpack into a directory |
boolean |
unPack(File dir,
ZipEntry ze)
unpack an individual entry into a directory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ZipReader(InputStream inStream)
inStream - public ZipReader(File file)
file - the file to readpublic ZipReader(String fileName)
fileName - | Method Detail |
|---|
public String getRootEntry()
public void setRootEntry(String rootEntry)
rootEntry - the rootEntry to setpublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - public Vector<ZipEntry> getEntries()
public ZipEntry getNextEntry()
public int unPack(File dir)
dir - the destination directory
public boolean unPack(File dir,
ZipEntry ze)
dir - ze -
public ZipEntry getEntry(String urlString)
urlString - the file path (case sensitive)
public ZipEntry getMatchingEntry(String expr,
int iSkip)
expr - the regexp to match - simplified regexp is acceptediSkip - how many to skip - default= 0
public InputStream getInputStream()
public XMLDoc getXMLDoc()
public JDFDoc getJDFDoc()
public void buffer()
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||