Customized input stream class
Class ArrayInputStream extends ObjectInputStream {
public Object resolveObject(Object obj) {
if (obj instanceof ArrayProxy) then
ArrayProxy proxy = (ArrayProxy) obj ;
int [] dat = new int [proxy.length] ;
dataVector.addElement(new ArrayInfo(INT, dat.length, dat)) ;
etc (deal with other primitive types).