Class ArrayInputStream extends ObjectInputStream { |
Vector dataVector ; |
public Object resolveObject(Object obj) { |
if (obj instanceof ArrayProxy) then |
ArrayProxy proxy = (ArrayProxy) obj ; |
switch (proxy.type) { |
case INT : |
int [] dat = new int [proxy.length] ; |
dataVector.addElement(new ArrayInfo(INT, dat.length, dat)) ; |
return dat ; |
etc (deal with other primitive types). |
else return obj ; |
} |
} |