Class TextByteBufMediaTypeConverter

java.lang.Object
io.inverno.mod.base.converter.ByteBufConverter
io.inverno.mod.boot.converter.TextByteBufMediaTypeConverter
All Implemented Interfaces:
Converter<ByteBuf,Object>, Decoder<ByteBuf,Object>, Encoder<Object,ByteBuf>, JoinableEncoder<Object,ByteBuf>, JoinablePrimitiveEncoder<ByteBuf>, MediaTypeConverter<ByteBuf>, ObjectConverter<ByteBuf>, PrimitiveDecoder<ByteBuf>, PrimitiveEncoder<ByteBuf>, ReactiveConverter<ByteBuf,Object>, ReactiveDecoder<ByteBuf,Object>, ReactiveEncoder<Object,ByteBuf>, SplittableDecoder<ByteBuf,Object>, SplittablePrimitiveDecoder<ByteBuf>

public class TextByteBufMediaTypeConverter extends ByteBufConverter implements MediaTypeConverter<ByteBuf>

ByteBuf text/plain media type converter.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • TextByteBufMediaTypeConverter

      public TextByteBufMediaTypeConverter(ObjectConverter<String> stringConverter)

      Creates a text/plain media type converter.

      Parameters:
      stringConverter - the underlying String converter
  • Method Details

    • canConvert

      public boolean canConvert(String mediaType)
      Description copied from interface: MediaTypeConverter

      Determines whether the converter can convert the specified media type.

      Specified by:
      canConvert in interface MediaTypeConverter<ByteBuf>
      Parameters:
      mediaType - a media type
      Returns:
      true if the converter can convert the media type, false otherwise