Class Resource


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

      Constructors 
      Constructor Description
      Resource​(java.net.URI uri, byte[] bytes)
      Constructs a resource.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBase64()
      Returns the content of this resource in Base64.
      byte[] getBytes()  
      java.lang.String getText()
      Returns the text content of this resource.
      java.net.URI getUri()
      Returns the URI of this resource.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Resource

        public Resource​(java.net.URI uri,
                        byte[] bytes)
        Constructs a resource.
    • Method Detail

      • getUri

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

        public byte[] getBytes()
      • getText

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

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