|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.util.Errorable
ewe.io.BasicStreamObject
ewe.io.StreamObject
ewe.zip.ZipInputStream
This is a FilterInputStream that reads the files in an zip archive one after another. It has a special method to get the zip entry of the next file. The zip entry contains information about the file name size, compressed size, CRC, etc. It includes support for STORED and DEFLATED entries.
| Field Summary |
| Fields inherited from class ewe.io.StreamObject |
napIterations, napTime, READWRITE_CLOSED, READWRITE_ERROR, READWRITE_WOULDBLOCK |
| Fields inherited from class ewe.io.BasicStreamObject |
closed |
| Fields inherited from class ewe.util.Errorable |
error |
| Constructor Summary | |
ZipInputStream(BasicStream input)
Creates a new Zip input stream, reading a zip archive. |
|
| Method Summary | |
int |
available()
|
void |
closeEntry()
Closes the current zip entry and moves to the next one. |
boolean |
closeStream()
Closes the zip file. |
protected ZipEntry |
createZipEntry(String name)
Creates a new zip entry for the given name. |
boolean |
flushStream()
This is non-blocking. |
ZipEntry |
getNextEntry()
Open the next entry from the zip archive, and return its description. |
int |
nonBlockingRead(byte[] b,
int off,
int len)
Reads a block of bytes from the current zip entry. |
| Methods inherited from class ewe.io.StreamObject |
close, doRead, doWrite, flush, isOpen, nap, nap, nonBlockingWrite, read, readAByte, readBytes, readBytes, write, writeAByte, writeBytes, writeBytes |
| Methods inherited from class ewe.io.BasicStreamObject |
getException, getName, read, read, throwIOException, toInputStream, toOutputStream, toStream, write, write |
| Methods inherited from class ewe.util.Errorable |
returnError, returnError, returnError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Constructor Detail |
public ZipInputStream(BasicStream input)
| Method Detail |
public ZipEntry getNextEntry()
public void closeEntry()
public int available()
public int nonBlockingRead(byte[] b,
int off,
int len)
nonBlockingRead in interface BasicStreamnonBlockingRead in class StreamObjectb - Destination byte array to hold incoming data.off - Starting index in buff for incoming data.len - Maximum number of bytes to read - should never be zero.
IOException - if a i/o error occured.
ZipException - if the deflated stream is corrupted.
public boolean closeStream()
throws IOException
closeStream in interface BasicStreamcloseStream in class StreamObjectIOException - if a i/o error occured.protected ZipEntry createZipEntry(String name)
name - the name of the zip entry.
public boolean flushStream()
throws IOException
BasicStream
flushStream in interface BasicStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||