org.rhq.core.util
Interface ZipUtil.ZipEntryVisitor

All Known Implementing Classes:
ExtractorZipFileVisitor, InMemoryZipFileVisitor
Enclosing class:
ZipUtil

public static interface ZipUtil.ZipEntryVisitor

Used by ZipUtil.walkZipFile(File, ZipEntryVisitor) to visit zip entries.


Method Summary
 boolean visit(ZipEntry entry, ZipInputStream stream)
          Visits a specific zip file entry.
 

Method Detail

visit

boolean visit(ZipEntry entry,
              ZipInputStream stream)
              throws Exception
Visits a specific zip file entry. Implementations can read the entry content from the given stream but must not close the stream - the caller of this method will handle the lifecycle of the stream.

Parameters:
entry - the entry being visited
stream - the stream containing the zip content
Returns:
the visitor should return true if everything is OK and processing of the zip content should continue; returning false will tell the walker to abort further traversing of the zip content.
Throws:
Exception - if the visitation failed for some reason - this will abort further walking of the zip content


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.