org.apache.maven.index.util.zip
Class TrueZipZipFileHandle

java.lang.Object
  extended by org.apache.maven.index.util.zip.AbstractZipHandle
      extended by org.apache.maven.index.util.zip.TrueZipZipFileHandle
All Implemented Interfaces:
ZipHandle

public class TrueZipZipFileHandle
extends AbstractZipHandle
implements ZipHandle


Constructor Summary
TrueZipZipFileHandle(File targetFile)
           
 
Method Summary
 void close()
          Closes the zip handle (performs resource cleanup).
 List<String> getEntries()
          Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.
 List<String> getEntries(EntryNameFilter filter)
          Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.
 InputStream getEntryContent(String path)
          Returns the "payload" (uncompressed) of the entry at given path, or null if no such path exists in the Zip file this handle points to.
protected  de.schlichtherle.truezip.zip.ZipFile getZipFile()
           
 boolean hasEntry(String path)
          Returns true if Zip file this handle is pointing to contains an entry at given path.
 
Methods inherited from class org.apache.maven.index.util.zip.AbstractZipHandle
getTargetFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrueZipZipFileHandle

public TrueZipZipFileHandle(File targetFile)
                     throws IOException
Throws:
IOException
Method Detail

getZipFile

protected de.schlichtherle.truezip.zip.ZipFile getZipFile()

hasEntry

public boolean hasEntry(String path)
                 throws IOException
Description copied from interface: ZipHandle
Returns true if Zip file this handle is pointing to contains an entry at given path.

Specified by:
hasEntry in interface ZipHandle
Returns:
Throws:
IOException

getEntries

public List<String> getEntries()
Description copied from interface: ZipHandle
Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.

Specified by:
getEntries in interface ZipHandle
Returns:

getEntries

public List<String> getEntries(EntryNameFilter filter)
Description copied from interface: ZipHandle
Returns a list of string, with each string representing a valid path for existing entry in this Zip handle.

Specified by:
getEntries in interface ZipHandle
Returns:

getEntryContent

public InputStream getEntryContent(String path)
                            throws IOException
Description copied from interface: ZipHandle
Returns the "payload" (uncompressed) of the entry at given path, or null if no such path exists in the Zip file this handle points to.

Specified by:
getEntryContent in interface ZipHandle
Returns:
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: ZipHandle
Closes the zip handle (performs resource cleanup). This method should be called when this zip handle is not needed anymore, and calling it should be obligatory to prevent resource leaks.

Specified by:
close in interface ZipHandle
Throws:
IOException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.