public class ArrayToBufferDecoder extends ArrayToBufferCodec implements IDecoder<byte[],ByteBuffer>
ByteBuffer
.Constructor and Description |
---|
ArrayToBufferDecoder()
Constructs a decoder with no buffer allocation (only by wrapping the input array)
|
ArrayToBufferDecoder(boolean allocate)
Constructs a decoder with a specified allocation mode.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ISession session,
byte[] data,
List<ByteBuffer> out)
Decodes data from one type to another one.
|
getInboundType, getOutboundType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInboundType, getOutboundType
public ArrayToBufferDecoder(boolean allocate)
allocate
- the allocation mode determining if the output buffer should
be allocated by the session's allocator or the buffer should
wrap the input array.public ArrayToBufferDecoder()
public void decode(ISession session, byte[] data, List<ByteBuffer> 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.