Class URLResource

java.lang.Object
org.zeroturnaround.javarebel.support.URLResource
All Implemented Interfaces:
Resource

public class URLResource extends Object implements Resource
A URL based resource.
Author:
Jevgeni Kabanov (ekabanov@zeroturnaround.com), Rein Raudjärv
  • Constructor Details

    • URLResource

      public URLResource(URL url)
  • Method Details

    • toURL

      public URL toURL()
      Description copied from interface: Resource
      Returns the URL that class is loaded from.
      Specified by:
      toURL in interface Resource
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBytes

      public byte[] getBytes()
      Description copied from interface: Resource
      Returns the binary representation of the class file. Returns null if the resource is missing or cannot be read.
      Specified by:
      getBytes in interface Resource
    • lastModified

      public long lastModified()
      Description copied from interface: Resource
      Returns a millisecond representation of last modified time comparable with System.currentTimeMillis(). Returns 0L if the resource is missing or cannot be read.
      Specified by:
      lastModified in interface Resource