Implementing the Client in Java (cont’d)
BufferedReader in = new BufferedReader(new FileReader(“Hello.ref”));
String ref = in.readLine();
org.omg.CORBA.Object obj = orb.string_to_object(ref);
Hello p = HelloHelper.narrow(obj);
Read “stringified” object reference
- Reads from a file
- Convert “stringified” reference into “real” object reference
“Narrow” to derived interface type