public class BufferHolderToArrayEncoder extends BufferHolderToArrayCodec implements IEncoder<IByteBufferHolder,byte[]>
IByteBufferHolder into an array of bytes.| Constructor and Description |
|---|
BufferHolderToArrayEncoder()
Constructs a decoder with no buffer releasing.
|
BufferHolderToArrayEncoder(boolean release)
Constructs a encoder with a specified buffer releasing mode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(ISession session,
IByteBufferHolder data,
List<byte[]> out)
Encodes data from one type to another one.
|
getInboundType, getOutboundType, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInboundType, getOutboundTypepublic BufferHolderToArrayEncoder(boolean release)
release - the releasing mode determining if buffers in the input buffer
holder should be released by the session's allocatorpublic BufferHolderToArrayEncoder()
public void encode(ISession session, IByteBufferHolder 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.
encode in interface IEncoder<IByteBufferHolder,byte[]>session - the ISession which the passed data belongs todata - the data to decode to another oneout - the List to which the decoded data should be added, or
null if O is VoidException - is thrown, if an error occurCopyright © 2017–2022 SNF4J.ORG. All rights reserved.