1 7 package org.omg.CORBA; 8 9 10 31 32 public abstract class LongSeqHelper 33 { 34 private static String _id = "IDL:omg.org/CORBA/LongSeq:1.0"; 35 36 public static void insert (org.omg.CORBA.Any a, int[] that) 37 { 38 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 39 a.type (type ()); 40 write (out, that); 41 a.read_value (out.create_input_stream (), type ()); 42 } 43 44 public static int[] extract (org.omg.CORBA.Any a) 45 { 46 return read (a.create_input_stream ()); 47 } 48 49 private static org.omg.CORBA.TypeCode __typeCode = null; 50 synchronized public static org.omg.CORBA.TypeCode type () 51 { 52 if (__typeCode == null) 53 { 54 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); 55 __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); 56 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.LongSeqHelper.id (), "LongSeq", __typeCode); 57 } 58 return __typeCode; 59 } 60 61 public static String id () 62 { 63 return _id; 64 } 65 66 public static int[] read (org.omg.CORBA.portable.InputStream istream) 67 { 68 int value[] = null; 69 int _len0 = istream.read_long (); 70 value = new int[_len0]; 71 istream.read_long_array (value, 0, _len0); 72 return value; 73 } 74 75 public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value) 76 { 77 ostream.write_long (value.length); 78 ostream.write_long_array (value, 0, value.length); 79 } 80 81 } 82 | Popular Tags |