1 7 8 13 14 17 25 26 package org.omg.CORBA; 27 28 abstract public class ValueBaseHelper 29 { 30 private static String _id = "IDL:omg.org/CORBA/ValueBase:1.0"; 31 32 public static void insert (org.omg.CORBA.Any a, java.io.Serializable that) 33 { 34 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 35 a.type (type ()); 36 write (out, that); 37 a.read_value (out.create_input_stream (), type ()); 38 } 39 40 public static java.io.Serializable extract (org.omg.CORBA.Any a) 41 { 42 return read (a.create_input_stream ()); 43 } 44 45 private static org.omg.CORBA.TypeCode __typeCode = null; 46 synchronized public static org.omg.CORBA.TypeCode type () 47 { 48 if (__typeCode == null) 49 { 50 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (TCKind.tk_value); 51 } 52 return __typeCode; 53 } 54 55 public static String id () 56 { 57 return _id; 58 } 59 60 public static java.io.Serializable read (org.omg.CORBA.portable.InputStream istream) 61 { 62 return ((org.omg.CORBA_2_3.portable.InputStream )istream).read_value (); 63 } 64 65 public static void write (org.omg.CORBA.portable.OutputStream ostream, java.io.Serializable value) 66 { 67 ((org.omg.CORBA_2_3.portable.OutputStream )ostream).write_value (value); 68 } 69 70 71 } 72 | Popular Tags |