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:
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the binary representation of the class file.
    long
    Returns a millisecond representation of last modified time comparable with System.currentTimeMillis().
    Returns the URL that class is loaded from.
  • Method Details

    • 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.