Class Resource

java.lang.Object
org.pkl.core.resource.Resource

public final class Resource extends Object
An external (file, HTTP, etc.) resource.
  • Constructor Details

    • Resource

      public Resource(URI uri, byte[] bytes)
      Constructs a resource.
  • Method Details

    • getUri

      public URI getUri()
      Returns the URI of this resource.
    • getBytes

      public byte[] getBytes()
    • getText

      public String getText()
      Returns the text content of this resource.
    • getBase64

      public String getBase64()
      Returns the content of this resource in Base64.