Package edu.umd.cs.findbugs.ba
Class URLClassPath.LocalArchiveEntry
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.URLClassPath.LocalArchiveEntry
-
- All Implemented Interfaces:
URLClassPath.Entry,java.lang.AutoCloseable
- Enclosing class:
- URLClassPath
private static class URLClassPath.LocalArchiveEntry extends java.lang.Object implements URLClassPath.Entry
Classpath entry class to load files from a zip/jar file in the local filesystem.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.zip.ZipFilezipFile
-
Constructor Summary
Constructors Constructor Description LocalArchiveEntry(java.lang.String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the underlying resource.java.lang.StringgetURL()Get filename or URL as string.java.io.InputStreamopenStream(java.lang.String resourceName)Open an input stream to read a resource in the codebase described by this classpath entry.
-
-
-
Method Detail
-
openStream
public java.io.InputStream openStream(java.lang.String resourceName) throws java.io.IOExceptionDescription copied from interface:URLClassPath.EntryOpen an input stream to read a resource in the codebase described by this classpath entry.- Specified by:
openStreamin interfaceURLClassPath.Entry- Parameters:
resourceName- name of resource to load: e.g., "java/lang/Object.class"- Returns:
- an InputStream, or null if the resource wasn't found
- Throws:
java.io.IOException- if an I/O error occurs
-
getURL
public java.lang.String getURL()
Description copied from interface:URLClassPath.EntryGet filename or URL as string.- Specified by:
getURLin interfaceURLClassPath.Entry
-
close
public void close()
Description copied from interface:URLClassPath.EntryClose the underlying resource.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceURLClassPath.Entry
-
-