D - a datum classpublic abstract static class MessageDecoder.BaseDecoder<D> extends Object implements MessageDecoder<D>
MessageEncoder implementations that provides default
implementations for most of the DatumEncoder API.
Implementations provided by this base class are thread-safe.
MessageDecoder.BaseDecoder<D>| Constructor and Description |
|---|
BaseDecoder() |
| Modifier and Type | Method and Description |
|---|---|
D |
decode(byte[] encoded)
Deserialize a single datum from a byte array.
|
D |
decode(byte[] encoded,
D reuse)
Deserialize a single datum from a byte array.
|
D |
decode(ByteBuffer encoded)
Deserialize a single datum from a ByteBuffer.
|
D |
decode(ByteBuffer encoded,
D reuse)
Deserialize a single datum from a ByteBuffer.
|
D |
decode(InputStream stream)
Deserialize a single datum from an InputStream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecodepublic D decode(InputStream stream) throws IOException
MessageDecoderdecode in interface MessageDecoder<D>stream - stream to read fromIOExceptionpublic D decode(ByteBuffer encoded) throws IOException
MessageDecoderdecode in interface MessageDecoder<D>encoded - a ByteBuffer containing an encoded datumIOExceptionpublic D decode(byte[] encoded) throws IOException
MessageDecoderdecode in interface MessageDecoder<D>encoded - a byte array containing an encoded datumIOExceptionpublic D decode(ByteBuffer encoded, D reuse) throws IOException
MessageDecoderdecode in interface MessageDecoder<D>encoded - a ByteBuffer containing an encoded datumreuse - a datum instance to reuse, avoiding instantiation if possibleIOExceptionpublic D decode(byte[] encoded, D reuse) throws IOException
MessageDecoderdecode in interface MessageDecoder<D>encoded - a byte array containing an encoded datumreuse - a datum instance to reuse, avoiding instantiation if possibleIOExceptionCopyright © 2009–2020 The Apache Software Foundation. All rights reserved.