001 package org.omg.CSI; 002 003 004 /** 005 * org/omg/CSI/OIDHelper.java . 006 * Generated by the IDL-to-Java compiler (portable), version "3.2" 007 * from /home/iurt/rpm/BUILD/geronimo-spec-corba/src/main/idl/CSI.idl 008 * Saturday, November 26, 2011 9:53:36 PM UTC 009 */ 010 011 012 // ASN.1 Encoding of an OBJECT IDENTIFIER 013 abstract public class OIDHelper 014 { 015 private static String _id = "IDL:omg.org/CSI/OID:1.0"; 016 017 public static void insert (org.omg.CORBA.Any a, byte[] that) 018 { 019 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 020 a.type (type ()); 021 write (out, that); 022 a.read_value (out.create_input_stream (), type ()); 023 } 024 025 public static byte[] extract (org.omg.CORBA.Any a) 026 { 027 return read (a.create_input_stream ()); 028 } 029 030 private static org.omg.CORBA.TypeCode __typeCode = null; 031 synchronized public static org.omg.CORBA.TypeCode type () 032 { 033 if (__typeCode == null) 034 { 035 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet); 036 __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); 037 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CSI.OIDHelper.id (), "OID", __typeCode); 038 } 039 return __typeCode; 040 } 041 042 public static String id () 043 { 044 return _id; 045 } 046 047 public static byte[] read (org.omg.CORBA.portable.InputStream istream) 048 { 049 byte value[] = null; 050 int _len0 = istream.read_long (); 051 value = new byte[_len0]; 052 istream.read_octet_array (value, 0, _len0); 053 return value; 054 } 055 056 public static void write (org.omg.CORBA.portable.OutputStream ostream, byte[] value) 057 { 058 ostream.write_long (value.length); 059 ostream.write_octet_array (value, 0, value.length); 060 } 061 062 }