RegistryContext ctx = new RegistryContext();
if (g) {
BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
Object o = null;
try {
o = ctx.lookup(name);
} catch (NamingException ex) {
if (tex)
throw new RuntimeException(ex);
else
out.print("Name not bound: " + name);
return;
}
oout.writeObject(o);
oout.close();
return;
}
if (l) {
BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
Object o = ctx.lookup(name);
if (!(o instanceof Context)) {
if (tex)
throw new RuntimeException("Object is not instance of Context. Can't list it. : " + name);
else