package org.dbxml.core.corba.db;

/**
 *	Generated from IDL definition of struct "EncodedBuffer"
 *	@author JacORB IDL compiler 
 */

public class EncodedBufferHelper
{
	private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB.init().create_struct_tc(org.dbxml.core.corba.db.EncodedBufferHelper.id(),"EncodedBuffer",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("stamp",org.omg.CORBA.ORB.init().create_alias_tc( org.dbxml.core.corba.db.TimestampHelper.id(),"Timestamp",org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(23))),null),new org.omg.CORBA.StructMember("sym",org.omg.CORBA.ORB.init().create_alias_tc( org.dbxml.core.corba.db.BufferHelper.id(),"Buffer",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10)))),null),new org.omg.CORBA.StructMember("buf",org.omg.CORBA.ORB.init().create_alias_tc( org.dbxml.core.corba.db.BufferHelper.id(),"Buffer",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10)))),null)});
	public EncodedBufferHelper ()
	{
	}
	public static void insert(org.omg.CORBA.Any any, org.dbxml.core.corba.db.EncodedBuffer s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}
	public static org.dbxml.core.corba.db.EncodedBuffer extract(org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}
	public static org.omg.CORBA.TypeCode type()
	{
		return _type;
	}
	public static String id()
	{
		return "IDL:org/dbxml/core/corba/db/EncodedBuffer:1.0";
	}
	public static org.dbxml.core.corba.db.EncodedBuffer read(org.omg.CORBA.portable.InputStream in)
	{
		org.dbxml.core.corba.db.EncodedBuffer result = new org.dbxml.core.corba.db.EncodedBuffer();
		result.stamp=in.read_longlong();
		result.sym = org.dbxml.core.corba.db.BufferHelper.read(in);
		result.buf = org.dbxml.core.corba.db.BufferHelper.read(in);
		return result;
	}
	public static void write(org.omg.CORBA.portable.OutputStream out, org.dbxml.core.corba.db.EncodedBuffer s)
	{
		out.write_longlong(s.stamp);
		org.dbxml.core.corba.db.BufferHelper.write(out,s.sym);
		org.dbxml.core.corba.db.BufferHelper.write(out,s.buf);
	}
}
