Constructor and Description |
---|
PacketEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
encode(ISession session,
Packet data,
List<byte[]> out)
Encodes data from one type to another one.
|
Class<Packet> |
getInboundType()
Returns the type of the accepted inbound objects.
|
Class<byte[]> |
getOutboundType()
Returns the type of the produced outbound objects.
|
public Class<Packet> getInboundType()
ICodec
getInboundType
in interface ICodec<Packet,byte[]>
public Class<byte[]> getOutboundType()
ICodec
getOutboundType
in interface ICodec<Packet,byte[]>
public void encode(ISession session, Packet data, List<byte[]> out) throws Exception
IEncoder
Encoders that do not produce an output (i.e. the O parameter is
Void
) cannot change the object passed as the data
argument. They should not also store it for future use as its state can
be changed.
The above limitations regarding the data
argument do not apply to
encoders that produce an output.
Copyright © 2017–2022 SNF4J.ORG. All rights reserved.