Class ZipResource

    • Constructor Detail

      • ZipResource

        protected ZipResource​(java.lang.String childName,
                              ZipRepository repository,
                              java.util.zip.ZipEntry entry)
    • Method Detail

      • lastModified

        public long lastModified()
        Description copied from interface: Trackable
        Returns the date the resource was last modified
        Returns:
        last modified date
      • getChecksum

        public long getChecksum()
        Description copied from interface: Trackable
        Checksum of the resource content. Implementations should make sure to return a different checksum if the resource's content has changed.
        Specified by:
        getChecksum in interface Trackable
        Overrides:
        getChecksum in class AbstractResource
        Returns:
        checksum
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Description copied from interface: Resource
        Returns an input stream to the content of the resource
        Returns:
        content input stream
        Throws:
        java.io.IOException - if a I/O related error occurs
      • exists

        public boolean exists()
                       throws java.io.IOException
        Description copied from interface: Trackable
        Checks wether this resource actually (still) exists
        Returns:
        true if the resource exists
        Throws:
        java.io.IOException
      • getUrl

        public java.net.URL getUrl()
                            throws java.net.MalformedURLException
        Description copied from interface: Trackable
        Returns an url to the resource if the repository of this resource is able to provide urls.
        Returns:
        url to the resource
        Throws:
        java.net.MalformedURLException
      • getLength

        public long getLength()
        Description copied from interface: Resource
        Returns the length of the resource's content
        Returns:
        content length
      • hashCode

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

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

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