Class ZipInputStreamCodeBase

java.lang.Object
edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBase
edu.umd.cs.findbugs.classfile.impl.ZipInputStreamCodeBase
All Implemented Interfaces:
ICodeBase, IScannableCodeBase, AutoCloseable

public class ZipInputStreamCodeBase extends AbstractScannableCodeBase
Implementation of ICodeBase to read from a zip file or jar file.
Author:
David Hovemeyer
  • Constructor Details

    • ZipInputStreamCodeBase

      public ZipInputStreamCodeBase(ICodeBaseLocator codeBaseLocator, File file) throws IOException
      Constructor.
      Parameters:
      codeBaseLocator - the codebase locator for this codebase
      file - the File containing the zip file (may be a temp file if the codebase was copied from a nested zipfile in another codebase)
      Throws:
      IOException
  • Method Details

    • lookupResource

      public ICodeBaseEntry lookupResource(String resourceName)
      Description copied from interface: ICodeBase
      Look up a resource in this code base.
      Parameters:
      resourceName - name of the resource to look up
      Returns:
      ICodeBaseEntry representing the resource or null if the resource cannot be found in this code base
    • iterator

      public ICodeBaseIterator iterator()
      Description copied from interface: IScannableCodeBase
      Get an iterator over the resources in the this code base.
      Returns:
      ICodeBaseIterator over the resources in the code base
    • getPathName

      public String getPathName()
      Description copied from interface: ICodeBase
      Get the filesystem pathname of this codebase.
      Returns:
      the filesystem pathname of this codebase, or null if this codebase is not accessible via the filesystem
    • close

      public void close()
      Description copied from interface: ICodeBase
      This method should be called when done using the code base.
    • toString

      public String toString()
      Overrides:
      toString in class Object