package demo.arrays.serverPackage;
public class arrayContainerHelper
	implements org.omg.CORBA.portable.Helper
{
	private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB.init().create_struct_tc(id(),"arrayContainer",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("shorty",org.omg.CORBA.ORB.init().create_array_tc(7,org.omg.CORBA.ORB.init().create_array_tc(3,org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(2)))),null)});
	public arrayContainerHelper ()
	{
	}
	public static void insert(org.omg.CORBA.Any any, demo.arrays.serverPackage.arrayContainer s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}
	public static demo.arrays.serverPackage.arrayContainer extract(org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}
	public static org.omg.CORBA.TypeCode type()
	{
		return _type;
	}
	public String get_id()
	{
		return id();
	}
	public org.omg.CORBA.TypeCode get_type()
	{
		return type();
	}
	public void write_Object(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
	{
		 throw new RuntimeException(" not implemented");
	}
	public java.lang.Object read_Object(org.omg.CORBA.portable.InputStream in)
	{
		 throw new RuntimeException(" not implemented");
	}
	public static String id()
	{
		return "IDL:arrays/server/arrayContainer:1.0";
	}
	public static demo.arrays.serverPackage.arrayContainer read(org.omg.CORBA.portable.InputStream in)
	{
		demo.arrays.serverPackage.arrayContainer result = new demo.arrays.serverPackage.arrayContainer();
		result.shorty = new short[7][];
		for(int i=0;i<7;i++)
		{
			result.shorty[i] = new short[3];
		in.read_short_array(result.shorty[i],0,3);
		}

		return result;
	}
	public static void write(org.omg.CORBA.portable.OutputStream out, demo.arrays.serverPackage.arrayContainer s)
	{
if(s.shorty.length<7) throw new org.omg.CORBA.MARSHAL("Incorrect array size "+s.shorty.length+", expecting 7");
		for( int i=0; i<7;i++)
		{
			if(s.shorty[i].length<3) throw new org.omg.CORBA.MARSHAL("Incorrect array size "+s.shorty[i].length+", expecting 3");
		out.write_short_array(s.shorty[i],0,3);
		}

	}
}


