package demo.arrays.serverPackage;
public class serversHelper
	implements org.omg.CORBA.portable.Helper
{
	private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB.init().create_array_tc(2,org.omg.CORBA.ORB.init().create_interface_tc( "IDL:arrays/server:1.0", "server"));
	public serversHelper ()
	{
	}
	public static void insert(org.omg.CORBA.Any any, demo.arrays.server[] s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}
	public static demo.arrays.server[] 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/servers:1.0";
	}
	public static demo.arrays.server[] read(org.omg.CORBA.portable.InputStream in)
	{
		demo.arrays.server[] result = new demo.arrays.server[2]
;
		for( int i = 0; i < 2; i++ )
		{
			result[i]=demo.arrays.serverHelper.read(in);
		}
		return result;
	}
	public static void write(org.omg.CORBA.portable.OutputStream out, demo.arrays.server[] s)
	{
		if( s.length != 2)
			throw new org.omg.CORBA.MARSHAL("Incorrect array size");
		for( int i = 0; i < s.length; i++ )
		{
			demo.arrays.serverHelper.write(out,s[i]);
		}
	}
}


