Java implementation of the gob binary encoding