java.lang.Object
com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
com.github.mizosoft.methanol.testing.CharSequenceEncoder
- All Implemented Interfaces:
BodyAdapter
,BodyAdapter.Encoder
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
AbstractBodyAdapter.BaseDecoder, AbstractBodyAdapter.BaseEncoder
Nested classes/interfaces inherited from interface com.github.mizosoft.methanol.BodyAdapter
BodyAdapter.Decoder, BodyAdapter.Encoder, BodyAdapter.Hints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
supportsType
(TypeRef<?> type) Returnstrue
if this adapter supports the given type.Returns aHttpRequest.BodyPublisher
that encodes the given object into a request body using the format specified by the given media type.Methods inherited from class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
attachMediaType, charsetOrDefault, charsetOrUtf8, compatibleMediaTypes, isCompatibleWith, requireCompatibleOrNull, requireSupport, requireSupport, requireSupport
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.mizosoft.methanol.BodyAdapter
isCompatibleWith
Methods inherited from interface com.github.mizosoft.methanol.BodyAdapter.Encoder
toBody
-
Constructor Details
-
CharSequenceEncoder
public CharSequenceEncoder()
-
-
Method Details
-
supportsType
Description copied from interface:BodyAdapter
Returnstrue
if this adapter supports the given type.- Specified by:
supportsType
in interfaceBodyAdapter
-
toBody
Description copied from interface:BodyAdapter.Encoder
Returns aHttpRequest.BodyPublisher
that encodes the given object into a request body using the format specified by the given media type. If the given media type isnull
, the encoder uses its default format parameters (e.g., charset).- Specified by:
toBody
in interfaceBodyAdapter.Encoder
-