Uses of Class
com.github.mizosoft.methanol.MediaType
Packages that use MediaType
Package
Description
-
Uses of MediaType in com.github.mizosoft.methanol
Fields in com.github.mizosoft.methanol declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeMediaType.ANY*/*static final MediaTypeMediaType.APPLICATION_ANYapplication/*static final MediaTypeMediaType.APPLICATION_FORM_URLENCODEDapplication/x-www-form-urlencodedstatic final MediaTypeMediaType.APPLICATION_JSONapplication/jsonstatic final MediaTypeMediaType.APPLICATION_OCTET_STREAMapplication/octet-streamstatic final MediaTypeMediaType.APPLICATION_X_PROTOBUFapplication/x-protobufstatic final MediaTypeMediaType.APPLICATION_XHTML_XMLapplication/xhtml+xmlstatic final MediaTypeMediaType.APPLICATION_XMLapplication/xmlstatic final MediaTypeMediaType.IMAGE_ANYimage/*static final MediaTypeMediaType.IMAGE_GIFimage/gifstatic final MediaTypeMediaType.IMAGE_JPEGimage/jpegstatic final MediaTypeMediaType.IMAGE_PNGimage/pngstatic final MediaTypeMediaType.TEXT_ANYtext/*static final MediaTypeMediaType.TEXT_HTMLtext/htmlstatic final MediaTypeMediaType.TEXT_MARKDOWNtext/markdownstatic final MediaTypeMediaType.TEXT_PLAINtext/plainstatic final MediaTypeMediaType.TEXT_XMLtext/xmlMethods in com.github.mizosoft.methanol that return MediaTypeModifier and TypeMethodDescriptionFormBodyPublisher.mediaType()MimeBodyPublisher.mediaType()Returns the body's media type.MultipartBodyPublisher.mediaType()default MediaTypeBodyAdapter.Hints.mediaTypeOrAny()Returns either theMediaTypehint orMediaType.ANYif absent.static MediaTypeReturns a newMediaTypewith the given type and subtype.static MediaTypeReturns a newMediaTypewith the given type, subtype and parameters.static MediaTypeParses the given string into aMediaTypeinstance.MediaType.withCharset(Charset charset) Returns a newMediaTypewith this instance's type, subtype and parameters but with the name of the given charset as the value of the charset parameter.MediaType.withParameter(String name, String value) Returns a newMediaTypewith this instance's type, subtype and parameters but with the value of the parameter specified by the given name set to the given value.MediaType.withParameters(Map<String, String> parameters) Returns a newMediaTypewith this instance's type, subtype and parameters but with each of the given parameters' names set to their corresponding values.Methods in com.github.mizosoft.methanol that return types with arguments of type MediaTypeMethods in com.github.mizosoft.methanol with parameters of type MediaTypeModifier and TypeMethodDescriptionAdds a file form field with given name, file and media type.MultipartBodyPublisher.Builder.formPart(String name, String filename, HttpRequest.BodyPublisher bodyPublisher, MediaType mediaType) Adds a form field with the given name, filename, body and media type.static Optional<BodyAdapter.Decoder> BodyAdapter.Decoder.getDecoder(TypeRef<?> typeRef, @Nullable MediaType mediaType) Returns a registered decoder that supports the given object type and media type, if any.static Optional<BodyAdapter.Encoder> BodyAdapter.Encoder.getEncoder(TypeRef<?> typeRef, @Nullable MediaType mediaType) Returns a registered encoder that supports the given object type and media type, if any.booleanReturns whether this media type includes the given one.booleanReturns true if this payload has the given media type.default booleanReturns true if this payload has any of the given media types.booleanBodyAdapter.isCompatibleWith(MediaType mediaType) Returnstrueif the format this adapter uses iscompatiblewith the given media type.booleanMediaType.isCompatibleWith(MediaType other) Returns whether this media type is compatible with the given one.Sets the media type of the multipart body.Sets the request method and sets the payload to the given value.<T> MutableRequestSets the request method and sets the payload to the given value with an explicitly specified type.static BodyAdapter.HintsReturns aHintsobject containing the given media type.static <T> HttpResponse.BodySubscriber<Supplier<T>> MoreBodySubscribers.ofDeferredObject(TypeRef<T> type, @Nullable MediaType mediaType) Returns aBodySubscriberthat decodes the response body into an object of the given type using an installeddecoder.static MimeBodyPublisherMoreBodyPublishers.ofMediaType(HttpRequest.BodyPublisher bodyPublisher, MediaType mediaType) Adapts the givenBodyPublisherinto aMimeBodyPublisherwith the given media type.static HttpRequest.BodyPublisherReturns aBodyPublisherthat encodes the given object into a request body using an installedencoder.static <T> HttpResponse.BodySubscriber<T> Returns aBodySubscriberthat decodes the response body into an object of the given type using an installeddecoder.Sets the request method to PATCH and sets the payload to the given value.static MutableRequestReturns a newMutableRequestwith the given URI and a PATCH method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a PATCH method.static MutableRequestReturns a newMutableRequestwith the given URI and a PATCH method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a PATCH method.<T> MutableRequestSets the request method to PATCH and sets the payload to the given value with an explicitly specified type.Sets the request method to POST and sets the payload to the given value.static MutableRequestReturns a newMutableRequestwith the given URI and a POST method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a POST method.static MutableRequestReturns a newMutableRequestwith the given URI and a POST method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a POST method.<T> MutableRequestSets the request method to POST and sets the payload to the given value with an explicitly specified type.Sets the request method to PUT and sets the payload to the given value.static MutableRequestReturns a newMutableRequestwith the given URI and a PUT method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a PUT method.static MutableRequestReturns a newMutableRequestwith the given URI and a PUT method.static <T> MutableRequestReturns a newMutableRequestwith the given URI and a PUT method.<T> MutableRequestSets the request method to PUT and sets the payload to the given value with an explicitly specified type.Returns aHttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type.default <T> HttpResponse.BodySubscriber<Supplier<T>> BodyAdapter.Decoder.toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Returns a completedHttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the format specified by the given media type.<T> HttpResponse.BodySubscriber<T> Returns aHttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the format specified by the given media type. -
Uses of MediaType in com.github.mizosoft.methanol.adapter
Methods in com.github.mizosoft.methanol.adapter that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionAbstractBodyAdapter.compatibleMediaTypes()Returns an immutable set containing the media types this adapter is compatible with.Methods in com.github.mizosoft.methanol.adapter with parameters of type MediaTypeModifier and TypeMethodDescriptionstatic HttpRequest.BodyPublisherAbstractBodyAdapter.attachMediaType(HttpRequest.BodyPublisher publisher, @Nullable MediaType mediaType) Converts the given publisher into aMimeBodyPublisherthat has the given media type only if it is notnullorhas a wildcard, otherwise the given publisher is returned as-is.static CharsetAbstractBodyAdapter.charsetOrDefault(@Nullable MediaType mediaType, Charset defaultCharset) Returns either the result ofMediaType.charsetOrDefault(Charset), or the given charset if the given media type isnull.static CharsetAbstractBodyAdapter.charsetOrUtf8(@Nullable MediaType mediaType) Returns either the result ofMediaType.charsetOrDefault(Charset), orUTF-8if the given media type isnull.final booleanAbstractBodyAdapter.isCompatibleWith(MediaType mediaType) booleanForwardingBodyAdapter.isCompatibleWith(MediaType mediaType) protected voidAbstractBodyAdapter.requireCompatibleOrNull(@Nullable MediaType mediaType) Requires that either this adapter iscompatiblewith the given media type, or the given media type isnull.default HttpRequest.BodyPublisherReturns aHttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type.default <T> HttpResponse.BodySubscriber<Supplier<T>> AbstractBodyAdapter.BaseDecoder.toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Returns a completedHttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the format specified by the given media type.<T> HttpResponse.BodySubscriber<Supplier<T>> ForwardingDecoder.toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) default <T> HttpResponse.BodySubscriber<T> Returns aHttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the format specified by the given media type.<T> HttpResponse.BodySubscriber<T> Constructors in com.github.mizosoft.methanol.adapter with parameters of type MediaTypeModifierConstructorDescriptionprotectedAbstractBodyAdapter(MediaType... compatibleMediaTypes) Creates anAbstractBodyAdaptercompatible with the given media types. -
Uses of MediaType in com.github.mizosoft.methanol.internal
Methods in com.github.mizosoft.methanol.internal with parameters of type MediaType -
Uses of MediaType in com.github.mizosoft.methanol.internal.extensions
Methods in com.github.mizosoft.methanol.internal.extensions that return MediaTypeConstructors in com.github.mizosoft.methanol.internal.extensions with parameters of type MediaTypeModifierConstructorDescriptionMimeBodyPublisherAdapter(HttpRequest.BodyPublisher upstream, MediaType mediaType)