Interface Resource

  • All Known Implementing Classes:
    FileResource, URLResource

    public interface Resource
    Represents an abstract resource that can be monitored for changes and is tied to a particular URL.
    Author:
    Jevgeni Kabanov (ekabanov@zeroturnaround.com)
    See Also:
    ResourceSource, ClassResourceSource, FileResource, URLResource
    • Method Detail

      • getBytes

        byte[] getBytes()
        Returns the binary representation of the class file. Returns null if the resource is missing or cannot be read.
      • lastModified

        long lastModified()
        Returns a millisecond representation of last modified time comparable with System.currentTimeMillis(). Returns 0L if the resource is missing or cannot be read.
      • toURL

        URL toURL()
        Returns the URL that class is loaded from.