Package org.zeroturnaround.javarebel
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 TypeMethodDescriptionbyte[]getBytes()Returns the binary representation of the class file.longReturns a millisecond representation of last modified time comparable withSystem.currentTimeMillis().toURL()Returns the URL that class is loaded from.
-
Method Details
-
getBytes
byte[] getBytes()Returns the binary representation of the class file. Returnsnullif the resource is missing or cannot be read. -
lastModified
long lastModified()Returns a millisecond representation of last modified time comparable withSystem.currentTimeMillis(). Returns0Lif the resource is missing or cannot be read. -
toURL
URL toURL()Returns the URL that class is loaded from.
-