Class Utils.HttpResponseCached

  • All Implemented Interfaces:
    java.net.http.HttpResponse<java.io.InputStream>
    Enclosing class:
    Utils

    public static final class Utils.HttpResponseCached
    extends java.lang.Object
    implements java.net.http.HttpResponse<java.io.InputStream>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.net.http.HttpResponse

        java.net.http.HttpResponse.BodyHandler<T extends java.lang.Object>, java.net.http.HttpResponse.BodyHandlers, java.net.http.HttpResponse.BodySubscriber<T extends java.lang.Object>, java.net.http.HttpResponse.BodySubscribers, java.net.http.HttpResponse.PushPromiseHandler<T extends java.lang.Object>, java.net.http.HttpResponse.ResponseInfo
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpResponseCached​(java.net.http.HttpResponse<java.io.InputStream> response)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream body()  
      byte[] bodyAsBytes()  
      java.lang.String bodyAsUtf8()  
      java.net.http.HttpHeaders headers()  
      java.util.Optional<java.net.http.HttpResponse<java.io.InputStream>> previousResponse()  
      java.net.http.HttpRequest request()  
      java.util.Optional<javax.net.ssl.SSLSession> sslSession()  
      int statusCode()  
      java.lang.String toString()  
      java.net.URI uri()  
      java.net.http.HttpClient.Version version()  
      • Methods inherited from class java.lang.Object

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

      • HttpResponseCached

        public HttpResponseCached​(java.net.http.HttpResponse<java.io.InputStream> response)
                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • bodyAsUtf8

        public java.lang.String bodyAsUtf8()
      • bodyAsBytes

        public byte[] bodyAsBytes()
      • statusCode

        public int statusCode()
        Specified by:
        statusCode in interface java.net.http.HttpResponse<java.io.InputStream>
      • request

        public java.net.http.HttpRequest request()
        Specified by:
        request in interface java.net.http.HttpResponse<java.io.InputStream>
      • previousResponse

        public java.util.Optional<java.net.http.HttpResponse<java.io.InputStream>> previousResponse()
        Specified by:
        previousResponse in interface java.net.http.HttpResponse<java.io.InputStream>
      • headers

        public java.net.http.HttpHeaders headers()
        Specified by:
        headers in interface java.net.http.HttpResponse<java.io.InputStream>
      • body

        public java.io.InputStream body()
        Specified by:
        body in interface java.net.http.HttpResponse<java.io.InputStream>
      • sslSession

        public java.util.Optional<javax.net.ssl.SSLSession> sslSession()
        Specified by:
        sslSession in interface java.net.http.HttpResponse<java.io.InputStream>
      • uri

        public java.net.URI uri()
        Specified by:
        uri in interface java.net.http.HttpResponse<java.io.InputStream>
      • version

        public java.net.http.HttpClient.Version version()
        Specified by:
        version in interface java.net.http.HttpResponse<java.io.InputStream>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object