OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream();
ostr.write_Object(obj);
InputStream istr = ostr.create_input_stream();
// read the IOR components back from the stream
int typeLength = istr.read_long();
typeData = new byte[typeLength];
istr.read_octet_array(typeData, 0, typeLength);
int numProfiles = istr.read_long();
profileTags = new int[numProfiles];
profileData = new byte[numProfiles][];