Class TextCodec
- java.lang.Object
-
- ch.raffael.meldioc.library.http.server.undertow.codec.TextCodec
-
- All Implemented Interfaces:
HttpDecoder<java.lang.Object,java.lang.String>,HttpEncoder<java.lang.Object,java.lang.CharSequence>
public class TextCodec extends java.lang.Object implements HttpEncoder<java.lang.Object,java.lang.CharSequence>, HttpDecoder<java.lang.Object,java.lang.String>
Simple string codecs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ch.raffael.meldioc.library.http.server.undertow.codec.HttpDecoder
HttpDecoder.Consumer<C,B>
-
-
Constructor Summary
Constructors Constructor Description TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType)TextCodec(ch.raffael.meldioc.library.codec.ContentType inputContentType, ch.raffael.meldioc.library.codec.ContentType outputContentType)TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType, java.nio.charset.Charset charset)TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType, java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(io.undertow.server.HttpServerExchange exchange, java.lang.Object ctx, HttpDecoder.Consumer<? super java.lang.Object,? super java.lang.String> consumer)voidencode(io.undertow.server.HttpServerExchange exchange, java.lang.Object ctx, java.lang.CharSequence value)static TextCodechtml()static TextCodechtml(java.nio.charset.Charset charset)static TextCodechtml(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)static TextCodecjson()static TextCodecplainText()static TextCodecplainText(java.nio.charset.Charset charset)static TextCodecplainText(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)static TextCodecxhtml()static TextCodecxhtml(java.nio.charset.Charset charset)static TextCodecxhtml(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)static TextCodecxml()static TextCodecxml(java.nio.charset.Charset charset)static TextCodecxml(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
-
-
Constructor Detail
-
TextCodec
public TextCodec(ch.raffael.meldioc.library.codec.ContentType inputContentType, ch.raffael.meldioc.library.codec.ContentType outputContentType)
-
TextCodec
public TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType)
-
TextCodec
public TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType, java.nio.charset.Charset charset)
-
TextCodec
public TextCodec(ch.raffael.meldioc.library.codec.ContentType contentType, java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
-
Method Detail
-
plainText
public static TextCodec plainText()
-
plainText
public static TextCodec plainText(java.nio.charset.Charset charset)
-
plainText
public static TextCodec plainText(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
html
public static TextCodec html()
-
html
public static TextCodec html(java.nio.charset.Charset charset)
-
html
public static TextCodec html(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
xml
public static TextCodec xml()
-
xml
public static TextCodec xml(java.nio.charset.Charset charset)
-
xml
public static TextCodec xml(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
xhtml
public static TextCodec xhtml()
-
xhtml
public static TextCodec xhtml(java.nio.charset.Charset charset)
-
xhtml
public static TextCodec xhtml(java.nio.charset.Charset inCharset, java.nio.charset.Charset outCharset)
-
json
public static TextCodec json()
-
encode
public void encode(io.undertow.server.HttpServerExchange exchange, java.lang.Object ctx, java.lang.CharSequence value)- Specified by:
encodein interfaceHttpEncoder<java.lang.Object,java.lang.CharSequence>
-
decode
public void decode(io.undertow.server.HttpServerExchange exchange, java.lang.Object ctx, HttpDecoder.Consumer<? super java.lang.Object,? super java.lang.String> consumer)- Specified by:
decodein interfaceHttpDecoder<java.lang.Object,java.lang.String>
-
-