Basic HTML version of Foils prepared July 6 99

Foil 34 Customized input stream class

From Object serialization for Marshalling Data in a Java Interface to MPI ACM Java Grande Meeting -- June 12-13 99. by Bryan Carpenter,Geoffrey C. Fox, Sung-Hoon Ko, Sang Lim


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 }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 6 1999