Class NoOpByteBufferCoder

    • Constructor Detail

      • NoOpByteBufferCoder

        public NoOpByteBufferCoder()
    • Method Detail

      • willDecode

        public boolean willDecode​(java.nio.ByteBuffer bytes)
        Description copied from interface: Decoder.Binary
        Answer whether the given bytes can be decoded into an object of type T.
        Specified by:
        willDecode in interface Decoder.Binary<java.nio.ByteBuffer>
        Parameters:
        bytes - the bytes to be decoded.
        Returns:
        whether or not the bytes can be decoded by this decoder.
      • decode

        public java.nio.ByteBuffer decode​(java.nio.ByteBuffer bytes)
                                   throws DecodeException
        Description copied from interface: Decoder.Binary
        Decode the given bytes into an object of type T.
        Specified by:
        decode in interface Decoder.Binary<java.nio.ByteBuffer>
        Parameters:
        bytes - the bytes to be decoded.
        Returns:
        the decoded object.
        Throws:
        DecodeException - If the provided bytes cannot be decoded to type T
      • encode

        public java.nio.ByteBuffer encode​(java.nio.ByteBuffer object)
                                   throws EncodeException
        Description copied from interface: Encoder.Binary
        Encode the given object into a byte array.
        Specified by:
        encode in interface Encoder.Binary<java.nio.ByteBuffer>
        Parameters:
        object - the object being encoded.
        Returns:
        the binary data.
        Throws:
        EncodeException - The provided object could not be encoded to a byte buffer