public class BufferToArrayDecoder extends BufferToArrayCodec implements IDecoder<ByteBuffer,byte[]>
ByteBuffer
into an array of bytes.Constructor and Description |
---|
BufferToArrayDecoder()
Constructs a decoder with no buffer releasing.
|
BufferToArrayDecoder(boolean release)
Constructs a decoder with a specified buffer releasing mode.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ISession session,
ByteBuffer data,
List<byte[]> out)
Decodes data from one type to another one.
|
getInboundType, getOutboundType, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInboundType, getOutboundType
public BufferToArrayDecoder(boolean release)
release
- the releasing mode determining if the input buffer should be
released by the session's allocatorpublic BufferToArrayDecoder()
public void decode(ISession session, ByteBuffer data, List<byte[]> out) throws Exception
IDecoder
Decoders 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
decoders that produce an output.
Copyright © 2017–2022 SNF4J.ORG. All rights reserved.