src/share/classes/org/omg/CORBA/AnySeqHelper.java

changeset 1
55540e827aef
child 158
91006f157c46
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/org/omg/CORBA/AnySeqHelper.java	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,101 @@
     1.4 +/*
     1.5 + * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Sun designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Sun in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 + * have any questions.
    1.27 + */
    1.28 +package org.omg.CORBA;
    1.29 +
    1.30 +
    1.31 +/**
    1.32 +* The Helper for <tt>AnySeq</tt>.  For more information on
    1.33 +* Helper files, see <a href="doc-files/generatedfiles.html#helper">
    1.34 +* "Generated Files: Helper Files"</a>.<P>
    1.35 +* org/omg/CORBA/AnySeqHelper.java
    1.36 +* Generated by the IDL-to-Java compiler (portable), version "3.0"
    1.37 +* from streams.idl
    1.38 +* 13 May 1999 22:41:36 o'clock GMT+00:00
    1.39 +*
    1.40 +* The class definition has been modified to conform to the following
    1.41 +* OMG specifications :
    1.42 +*   <ul>
    1.43 +*       <li> ORB core as defined by CORBA 2.3.1
    1.44 +*       (<a href="http://cgi.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
    1.45 +*       </li>
    1.46 +*
    1.47 +*       <li> IDL/Java Language Mapping as defined in
    1.48 +*       <a href="http://cgi.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
    1.49 +*       </li>
    1.50 +*   </ul>
    1.51 +*/
    1.52 +
    1.53 +public abstract class AnySeqHelper
    1.54 +{
    1.55 +    private static String  _id = "IDL:omg.org/CORBA/AnySeq:1.0";
    1.56 +
    1.57 +    public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.Any[] that)
    1.58 +    {
    1.59 +        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    1.60 +        a.type (type ());
    1.61 +        write (out, that);
    1.62 +        a.read_value (out.create_input_stream (), type ());
    1.63 +    }
    1.64 +
    1.65 +    public static org.omg.CORBA.Any[] extract (org.omg.CORBA.Any a)
    1.66 +    {
    1.67 +        return read (a.create_input_stream ());
    1.68 +    }
    1.69 +
    1.70 +    private static org.omg.CORBA.TypeCode __typeCode = null;
    1.71 +    synchronized public static org.omg.CORBA.TypeCode type ()
    1.72 +    {
    1.73 +        if (__typeCode == null)
    1.74 +            {
    1.75 +                __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any);
    1.76 +                __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
    1.77 +                __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.AnySeqHelper.id (), "AnySeq", __typeCode);
    1.78 +            }
    1.79 +        return __typeCode;
    1.80 +    }
    1.81 +
    1.82 +    public static String id ()
    1.83 +    {
    1.84 +        return _id;
    1.85 +    }
    1.86 +
    1.87 +    public static org.omg.CORBA.Any[] read (org.omg.CORBA.portable.InputStream istream)
    1.88 +    {
    1.89 +        org.omg.CORBA.Any value[] = null;
    1.90 +        int _len0 = istream.read_long ();
    1.91 +        value = new org.omg.CORBA.Any[_len0];
    1.92 +        for (int _o1 = 0;_o1 < value.length; ++_o1)
    1.93 +            value[_o1] = istream.read_any ();
    1.94 +        return value;
    1.95 +    }
    1.96 +
    1.97 +    public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.Any[] value)
    1.98 +    {
    1.99 +        ostream.write_long (value.length);
   1.100 +        for (int _i0 = 0;_i0 < value.length; ++_i0)
   1.101 +            ostream.write_any (value[_i0]);
   1.102 +    }
   1.103 +
   1.104 +}

mercurial