Customized output stream class
Class ArrayOutputStream extends ObjectOutputStream {
public Object replaceObject(Object obj) {
if obj is a primitive array, then
if obj is (eg) an int[], then
int len = ((int []) obj).length ;
dataVector.addElement(new ArrayInfo(INT, len, obj)) ;
return new ArrayProxy(INT, len) ;
etc (deal with other primitive types).
else, if not a primitive array, then