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 interface com.github.mizosoft.methanol.BodyAdapter
BodyAdapter.Decoder, BodyAdapter.Encoder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
supportsType
(TypeRef<?> type) Returnstrue
if this adapter supports the given type.Returns aBodyPublisher
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
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
-
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 aBodyPublisher
that encodes the given object into a request body using the format specified by the given media type. IfmediaType
isnull
, the encoder's default format parameters (e.g. charset) are be used.- Specified by:
toBody
in interfaceBodyAdapter.Encoder
-