[Java] (De)Serialization

Complete process reviewed and tested. Java <-> Javascript
interoperability to be checked.