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


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 ;
}
}



© 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