public final class TcpCodecs
extends java.lang.Object
TcpNetServerConnectionFactory server = new TcpNetServerConnectionFactory(1234); server.setSerializer(TcpCodecs.lf()); server.setDserializer(TcpCodecs.lf()); ...
Modifier and Type | Method and Description |
---|---|
static ByteArrayCrLfSerializer |
crlf() |
static ByteArrayLengthHeaderSerializer |
lengthHeader(int bytes) |
static ByteArrayLengthHeaderSerializer |
lengthHeader1() |
static ByteArrayLengthHeaderSerializer |
lengthHeader2() |
static ByteArrayLengthHeaderSerializer |
lengthHeader4() |
static ByteArrayLfSerializer |
lf() |
static ByteArrayRawSerializer |
raw() |
static ByteArraySingleTerminatorSerializer |
singleTerminator(byte terminator) |
static ByteArrayStxEtxSerializer |
stxetx() |
public static ByteArrayCrLfSerializer crlf()
ByteArrayCrLfSerializer
.public static ByteArrayLfSerializer lf()
ByteArrayLfSerializer
.public static ByteArrayRawSerializer raw()
ByteArrayRawSerializer
.public static ByteArrayStxEtxSerializer stxetx()
ByteArrayStxEtxSerializer
.public static ByteArraySingleTerminatorSerializer singleTerminator(byte terminator)
terminator
- the terminator indicating message end.ByteArraySingleTerminatorSerializer
using the supplied
terminator.public static ByteArrayLengthHeaderSerializer lengthHeader1()
ByteArrayLengthHeaderSerializer
with a 1 byte header.public static ByteArrayLengthHeaderSerializer lengthHeader2()
ByteArrayLengthHeaderSerializer
with a 2 byte header.public static ByteArrayLengthHeaderSerializer lengthHeader4()
ByteArrayLengthHeaderSerializer
with a 4 byte header.public static ByteArrayLengthHeaderSerializer lengthHeader(int bytes)
bytes
- header length.ByteArrayLengthHeaderSerializer
with a 1, 2 or 4 byte header.