}
return addr;
}
private static Address readOtherAddress(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
ClassConfigurator conf;
try {
conf=ClassConfigurator.getInstance(false);
}
catch(ChannelException e) {
IllegalAccessException new_ex=new IllegalAccessException();
new_ex.initCause(e);
throw new_ex;
}
int b=in.read();
short magic_number;
String classname;
Class cl=null;
Address addr;
if(b == 1) {
magic_number=in.readShort();
cl=conf.get(magic_number);
}
else {
classname=in.readUTF();
cl=conf.get(classname);
}
addr=(Address)cl.newInstance();
addr.readFrom(in);
return addr;
}