|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ejtools.archive.io.StreamReader
Reader implementation based on stream.
Each Archive and each Entry will be created through a ZipInputStream. This classe serves as parent for derived ones.
As the structure is dynamically created, the Visitor Pattern cannot be strictly followed.
Constructor Summary | |
StreamReader()
|
Method Summary | |
protected Entry |
createEntry(java.lang.String uri)
Helper method to create an entry. |
protected java.util.zip.ZipInputStream |
getZipInputStream()
Returns the current stream |
protected java.util.zip.ZipInputStream |
popZipInputStream()
Pops the last entered stream |
protected void |
pushZipInputStream(java.util.zip.ZipInputStream stream)
Pushes a stream onto the stack |
void |
visit(Archive archive)
Visit an archive. |
void |
visit(Entry entry)
Visit an entry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamReader()
Method Detail |
public void visit(Entry entry)
visit
in interface Reader
entry
- The entry to visitpublic void visit(Archive archive)
visit
in interface Reader
archive
- The archive to visitprotected Entry createEntry(java.lang.String uri)
uri
- The URI of the entry
protected java.util.zip.ZipInputStream getZipInputStream()
protected java.util.zip.ZipInputStream popZipInputStream() throws java.io.IOException
java.io.IOException
- If no stream is availableprotected void pushZipInputStream(java.util.zip.ZipInputStream stream) throws java.io.IOException
stream
- The stream
java.io.IOException
- Shoud never occured
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |