1 7 10 18 19 package com.sun.corba.se.impl.corba; 20 21 abstract public class AnyImplHelper 22 { 23 private static String _id = "IDL:omg.org/CORBA/Any:1.0"; 24 25 public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.Any that) 26 { 27 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 28 a.type (type ()); 29 write (out, that); 30 a.read_value (out.create_input_stream (), type ()); 31 } 32 33 public static org.omg.CORBA.Any extract (org.omg.CORBA.Any a) 34 { 35 return read (a.create_input_stream ()); 36 } 37 38 private static org.omg.CORBA.TypeCode __typeCode = null; 39 synchronized public static org.omg.CORBA.TypeCode type () 40 { 41 if (__typeCode == null) 42 { 43 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any); 44 } 45 return __typeCode; 46 } 47 48 public static String id () 49 { 50 return _id; 51 } 52 53 public static org.omg.CORBA.Any read (org.omg.CORBA.portable.InputStream istream) 54 { 55 return istream.read_any (); 56 } 57 58 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.Any value) 59 { 60 ostream.write_any (value); 61 } 62 63 } 64 | Popular Tags |