00001 package sctConf;
00002
00003
00012
00013 abstract public class RxArrayHelper
00014 {
00015 private static String _id = "IDL:sctConf/RxArray:1.0";
00016
00017 public static void insert (org.omg.CORBA.Any a, byte[] that)
00018 {
00019 org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
00020 a.type (type ());
00021 write (out, that);
00022 a.read_value (out.create_input_stream (), type ());
00023 }
00024
00025 public static byte[] extract (org.omg.CORBA.Any a)
00026 {
00027 return read (a.create_input_stream ());
00028 }
00029
00030 private static org.omg.CORBA.TypeCode __typeCode = null;
00031 synchronized public static org.omg.CORBA.TypeCode type ()
00032 {
00033 if (__typeCode == null)
00034 {
00035 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet);
00036 __typeCode = org.omg.CORBA.ORB.init ().create_array_tc (2, __typeCode );
00037 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (sctConf.RxArrayHelper.id (), "RxArray", __typeCode);
00038 }
00039 return __typeCode;
00040 }
00041
00042 public static String id ()
00043 {
00044 return _id;
00045 }
00046
00047 public static byte[] read (org.omg.CORBA.portable.InputStream istream)
00048 {
00049 byte value[] = null;
00050 value = new byte[2];
00051 for (int _o0 = 0;_o0 < (2); ++_o0)
00052 {
00053 value[_o0] = istream.read_octet ();
00054 }
00055 return value;
00056 }
00057
00058 public static void write (org.omg.CORBA.portable.OutputStream ostream, byte[] value)
00059 {
00060 if (value.length != (2))
00061 throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
00062 for (int _i0 = 0;_i0 < (2); ++_i0)
00063 {
00064 ostream.write_octet (value[_i0]);
00065 }
00066 }
00067
00068 }