Package com.lucimber.dbus.codec.encoder
Class EncoderResultImpl<T>
java.lang.Object
com.lucimber.dbus.codec.encoder.EncoderResultImpl<T>
- Type Parameters:
T
- The buffer's type.
- All Implemented Interfaces:
EncoderResult<T>
Default implementation of the
EncoderResult
interface.-
Constructor Summary
ConstructorsConstructorDescriptionEncoderResultImpl
(int byteCount, T buffer) Creates a new instance with the necessary arguments. -
Method Summary
Modifier and TypeMethodDescriptionGets the buffer that contains the result of the encoding.int
Gets the number of bytes, that have been encoded by this encoder while producing the result.
-
Constructor Details
-
EncoderResultImpl
Creates a new instance with the necessary arguments.- Parameters:
byteCount
- The number of encoded bytes.buffer
- The buffer that contains the result of the encoding.
-
-
Method Details
-
getProducedBytes
public int getProducedBytes()Description copied from interface:EncoderResult
Gets the number of bytes, that have been encoded by this encoder while producing the result.- Specified by:
getProducedBytes
in interfaceEncoderResult<T>
- Returns:
- An integer as the number of encoded bytes.
-
getBuffer
Description copied from interface:EncoderResult
Gets the buffer that contains the result of the encoding.- Specified by:
getBuffer
in interfaceEncoderResult<T>
- Returns:
- A buffer.
-