Package edu.umd.cs.findbugs.ba
Class URLClassPath.LocalDirectoryEntry
java.lang.Object
edu.umd.cs.findbugs.ba.URLClassPath.LocalDirectoryEntry
- All Implemented Interfaces:
URLClassPath.Entry
,AutoCloseable
- Enclosing class:
URLClassPath
Classpath entry class to load files from a directory in the local
filesystem.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the underlying resource.getURL()
Get filename or URL as string.openStream
(String resourceName) Open an input stream to read a resource in the codebase described by this classpath entry.
-
Field Details
-
dirName
-
-
Constructor Details
-
LocalDirectoryEntry
Constructor.- Parameters:
dirName
- name of the local directory- Throws:
IOException
- if dirName is not a directory
-
-
Method Details
-
openStream
Description copied from interface:URLClassPath.Entry
Open an input stream to read a resource in the codebase described by this classpath entry.- Specified by:
openStream
in 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:
IOException
- if an I/O error occurs
-
getURL
Description copied from interface:URLClassPath.Entry
Get filename or URL as string.- Specified by:
getURL
in interfaceURLClassPath.Entry
-
close
public void close()Description copied from interface:URLClassPath.Entry
Close the underlying resource.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceURLClassPath.Entry
-