Package generic.jar

Class JarResource

  • All Implemented Interfaces:
    Resource

    public class JarResource
    extends java.lang.Object
    implements Resource
    • Constructor Detail

      • JarResource

        public JarResource​(java.io.File jarFile,
                           JarEntryFilter filter)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • JarResource

        public JarResource​(JarResource parent,
                           java.lang.String path)
    • Method Detail

      • getAbsolutePath

        public java.lang.String getAbsolutePath()
        Specified by:
        getAbsolutePath in interface Resource
      • toURL

        public java.net.URL toURL()
                           throws java.net.MalformedURLException
        Specified by:
        toURL in interface Resource
        Throws:
        java.net.MalformedURLException
      • toURI

        public java.net.URI toURI()
        Specified by:
        toURI in interface Resource
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Resource
      • isFile

        public boolean isFile()
        Specified by:
        isFile in interface Resource
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface Resource
        Throws:
        java.io.IOException
      • delete

        public boolean delete()
        Specified by:
        delete in interface Resource
      • exists

        public boolean exists()
        Specified by:
        exists in interface Resource
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.FileNotFoundException
        Specified by:
        getOutputStream in interface Resource
        Throws:
        java.io.FileNotFoundException
      • getFile

        public java.io.File getFile()
        Specified by:
        getFile in interface Resource
      • length

        public long length()
        Specified by:
        length in interface Resource
      • getCanonicalPath

        public java.lang.String getCanonicalPath()
                                          throws java.io.IOException
        Specified by:
        getCanonicalPath in interface Resource
        Throws:
        java.io.IOException
      • canWrite

        public boolean canWrite()
        Specified by:
        canWrite in interface Resource
      • mkdir

        public boolean mkdir()
        Specified by:
        mkdir in interface Resource
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object