Class JarResource

All Implemented Interfaces:
Closeable, AutoCloseable, ResourceFactory
Direct Known Subclasses:
JarFileResource

@Deprecated(since="2021-05-27") public class JarResource extends URLResource
Deprecated.
  • Method Details

    • close

      public void close()
      Deprecated.
      Description copied from class: URLResource
      Release any resources held by the resource.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class URLResource
    • exists

      public boolean exists()
      Deprecated.
      Returns true if the represented resource exists.
      Overrides:
      exists in class URLResource
      Returns:
      true if the represented resource exists.
    • getFile

      public File getFile() throws IOException
      Deprecated.
      Description copied from class: URLResource
      Returns an File representing the given resource or NULL if this is not possible.
      Overrides:
      getFile in class URLResource
      Returns:
      an File representing the given resource or NULL if this is not possible.
      Throws:
      IOException - if unable to get the resource due to permissions
    • getInputStream

      public InputStream getInputStream() throws IOException
      Deprecated.
      Description copied from class: URLResource
      Returns an input stream to the resource. The underlying url connection will be nulled out to prevent re-use.
      Overrides:
      getInputStream in class URLResource
      Returns:
      an input stream to the resource
      Throws:
      IOException - if unable to open the input stream
    • copyTo

      public void copyTo(File directory) throws IOException
      Deprecated.
      Description copied from class: Resource
      Copy the Resource to the new destination file.

      Will not replace existing destination file.

      Overrides:
      copyTo in class Resource
      Parameters:
      directory - the destination file to create
      Throws:
      IOException - if unable to copy the resource
    • newJarResource

      public static Resource newJarResource(Resource resource) throws IOException
      Deprecated.
      Throws:
      IOException