Interface Transcoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object decode​(byte[] encoded)
      Decodes a stream of bytes produced by encode(Object) back into the original object.
      byte[] encode​(java.lang.Object o)
      Encodes an object into a stream of bytes.
    • Method Detail

      • encode

        byte[] encode​(java.lang.Object o)
               throws java.io.IOException
        Encodes an object into a stream of bytes.
        Parameters:
        o - Object to encode.
        Returns:
        Object encoded as a byte array.
        Throws:
        java.io.IOException - On encoding errors.
      • decode

        java.lang.Object decode​(byte[] encoded)
                         throws java.io.IOException
        Decodes a stream of bytes produced by encode(Object) back into the original object.
        Parameters:
        encoded - Encoded representation of an object.
        Returns:
        Object decoded from byte array.
        Throws:
        java.io.IOException - On decoding errors.