class optimisation for applet I/O