return tc;
}
public Any read_any() {
Any any = orb.create_any();
TypeCodeImpl tc = new TypeCodeImpl(orb);
// read off the typecode
// REVISIT We could avoid this try-catch if we could peek the typecode
// kind off this stream and see if it is a tk_value. Looking at the
// code we know that for tk_value the Any.read_value() below
// ignores the tc argument anyway (except for the kind field).
// But still we would need to make sure that the whole typecode,
// including encapsulations, is read off.
try {
tc.read_value(parent);
} catch (MARSHAL ex) {
if (tc.kind().value() != TCKind._tk_value)
throw ex;
// We can be sure that the whole typecode encapsulation has been
// read off.
dprintThrowable(ex);
}