1 | Class ArrayInputStream extends ObjectInputStream { |
2 | Vector dataVector ; |
3 | public Object resolveObject(Object obj) { |
4 | if (obj instanceof ArrayProxy) then |
5 | ArrayProxy proxy = (ArrayProxy) obj ; |
6 | switch (proxy.type) { |
7 | case INT : |
8 | int [] dat = new int [proxy.length] ; |
9 | dataVector.addElement(new ArrayInfo(INT, dat.length, dat)) ; |
10 | return dat ; |
11 | etc (deal with other primitive types). |
12 | else return obj ; |
13 | } |
14 | } |