Class BinaryCodec<T>
java.lang.Object
ch.raffael.meldioc.library.http.server.undertow.codec.BinaryCodec<T>
- All Implemented Interfaces:
HttpDecoder<T>,HttpEncoder<T>
- Direct Known Subclasses:
BinaryCodec.ByteArray,BinaryCodec.ByteBuffer,BinaryCodec.ByteBufferArray
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classNested classes/interfaces inherited from interface ch.raffael.meldioc.library.http.server.undertow.codec.HttpDecoder
HttpDecoder.Consumer<B>, HttpDecoder.IgnoreBodyDecoder<B> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBinaryCodec(ch.raffael.meldioc.library.codec.ContentType contentType) protectedBinaryCodec(String... contentTypes) -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(io.undertow.server.HttpServerExchange exchange, HttpDecoder.Consumer<? super T> consumer) voidprotected abstract TfromBytes(byte[] bytes) protected abstract ByteBuffer[]toByteBuffers(T value)
-
Constructor Details
-
BinaryCodec
-
BinaryCodec
protected BinaryCodec(ch.raffael.meldioc.library.codec.ContentType contentType)
-
-
Method Details
-
decode
public void decode(io.undertow.server.HttpServerExchange exchange, HttpDecoder.Consumer<? super T> consumer) throws Exception - Specified by:
decodein interfaceHttpDecoder<T>- Throws:
Exception
-
encode
- Specified by:
encodein interfaceHttpEncoder<T>
-
toByteBuffers
-
fromBytes
-