Class WebResource.ByteResource

  • All Implemented Interfaces:
    WebResource
    Enclosing interface:
    WebResource

    public static final class WebResource.ByteResource
    extends java.lang.Object
    implements WebResource
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteResource​(byte[] content)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] asBytes()  
      java.io.InputStream asStream()  
      java.lang.String asString()
      Return the resource as a UTF-8 String.
      • Methods inherited from class java.lang.Object

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

      • ByteResource

        public ByteResource​(byte[] content)
    • Method Detail

      • asString

        public java.lang.String asString()
        Description copied from interface: WebResource
        Return the resource as a UTF-8 String.
        Specified by:
        asString in interface WebResource
        Returns:
        The resource in UTF-8.
      • asStream

        public java.io.InputStream asStream()
        Specified by:
        asStream in interface WebResource