Interface URLClassPath.Entry

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
URLClassPath.LocalArchiveEntry, URLClassPath.LocalDirectoryEntry, URLClassPath.RemoteArchiveEntry, URLClassPath.RemoteDirectoryEntry
Enclosing class:
URLClassPath

private static interface URLClassPath.Entry extends AutoCloseable
Interface describing a single classpath entry.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the underlying resource.
    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.
  • Method Details

    • openStream

      InputStream openStream(String resourceName) throws IOException
      Open an input stream to read a resource in the codebase described by this classpath 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

      String getURL()
      Get filename or URL as string.
    • close

      void close()
      Close the underlying resource.
      Specified by:
      close in interface AutoCloseable