Module methanol

Class ForwardingDecoder

    • Method Detail

      • toObject

        public <T> java.net.http.HttpResponse.BodySubscriber<T> toObject​(TypeRef<T> typeRef,
                                                                         @Nullable MediaType mediaType)
        Description copied from interface: BodyAdapter.Decoder
        Returns a HttpResponse.BodySubscriber that decodes the response body into an object of the given type using the format specified by the given media type. If the given media type is null, the decoder's default format parameters (e.g., charset) are used.
        Specified by:
        toObject in interface BodyAdapter.Decoder
      • toDeferredObject

        public <T> java.net.http.HttpResponse.BodySubscriber<java.util.function.Supplier<T>> toDeferredObject​(TypeRef<T> typeRef,
                                                                                                              @Nullable MediaType mediaType)
        Description copied from interface: BodyAdapter.Decoder
        Returns a completed HttpResponse.BodySubscriber that lazily decodes the response body into an object of the given type using the format specified by the given media type. If mediaType is null, the decoder uses its default format parameters (e.g., charset).
        Specified by:
        toDeferredObject in interface BodyAdapter.Decoder