Module methanol

Interface AbstractBodyAdapter.BaseDecoder

    • Method Detail

      • toObject

        default <T> java.net.http.HttpResponse.BodySubscriber<T> toObject​(TypeRef<T> typeRef,
                                                                          @Nullable MediaType mediaType)
        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

        default <T> java.net.http.HttpResponse.BodySubscriber<java.util.function.Supplier<T>> toDeferredObject​(TypeRef<T> typeRef,
                                                                                                               @Nullable MediaType mediaType)
        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
      • toDeferredObject

        default <T> java.net.http.HttpResponse.BodySubscriber<java.util.function.Supplier<T>> toDeferredObject​(TypeRef<T> typeRef,
                                                                                                               BodyAdapter.Hints hints)
        Returns a completed HttpResponse.BodySubscriber that lazily decodes the response body into an object of the given type using the given BodyAdapter.Hints.
        Specified by:
        toDeferredObject in interface BodyAdapter.Decoder