Added support for Java string serialisation.