DoubleSeqHelper.java revision 608:7e06bf1dcb09
1243789Sdim/* 2243789Sdim * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. 3243789Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4243789Sdim * 5243789Sdim * This code is free software; you can redistribute it and/or modify it 6243789Sdim * under the terms of the GNU General Public License version 2 only, as 7243789Sdim * published by the Free Software Foundation. Oracle designates this 8243789Sdim * particular file as subject to the "Classpath" exception as provided 9243789Sdim * by Oracle in the LICENSE file that accompanied this code. 10243789Sdim * 11243789Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 12243789Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13243789Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14243789Sdim * version 2 for more details (a copy is included in the LICENSE file that 15243789Sdim * accompanied this code). 16243789Sdim * 17243789Sdim * You should have received a copy of the GNU General Public License version 18243789Sdim * 2 along with this work; if not, write to the Free Software Foundation, 19243789Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20243789Sdim * 21243789Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22243789Sdim * or visit www.oracle.com if you need additional information or have any 23243789Sdim * questions. 24243789Sdim */ 25243789Sdimpackage org.omg.CORBA; 26243789Sdim 27243789Sdim 28243789Sdim/** 29243789Sdim* The Helper for <tt>DoubleSeq</tt>. For more information on 30243789Sdim* Helper files, see <a href="doc-files/generatedfiles.html#helper"> 31243789Sdim* "Generated Files: Helper Files"</a>.<P> 32243789Sdim* org/omg/CORBA/DoubleSeqHelper.java 33243789Sdim* Generated by the IDL-to-Java compiler (portable), version "3.0" 34243789Sdim* from streams.idl 35243789Sdim* 13 May 1999 22:41:37 o'clock GMT+00:00 36243789Sdim* 37243789Sdim* The class definition has been modified to conform to the following 38243789Sdim* OMG specifications : 39243789Sdim* <ul> 40243789Sdim* <li> ORB core as defined by CORBA 2.3.1 41243789Sdim* (<a href="http://www.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>) 42243789Sdim* </li> 43243789Sdim* 44243789Sdim* <li> IDL/Java Language Mapping as defined in 45243789Sdim* <a href="http://www.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a> 46243789Sdim* </li> 47243789Sdim* </ul> 48243789Sdim*/ 49243789Sdim 50243789Sdimpublic abstract class DoubleSeqHelper 51243789Sdim{ 52243789Sdim private static String _id = "IDL:omg.org/CORBA/DoubleSeq:1.0"; 53243789Sdim 54243789Sdim public static void insert (org.omg.CORBA.Any a, double[] that) 55243789Sdim { 56243789Sdim org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 57243789Sdim a.type (type ()); 58243789Sdim write (out, that); 59243789Sdim a.read_value (out.create_input_stream (), type ()); 60243789Sdim } 61243789Sdim 62243789Sdim public static double[] extract (org.omg.CORBA.Any a) 63243789Sdim { 64243789Sdim return read (a.create_input_stream ()); 65243789Sdim } 66243789Sdim 67243789Sdim private static org.omg.CORBA.TypeCode __typeCode = null; 68243789Sdim synchronized public static org.omg.CORBA.TypeCode type () 69243789Sdim { 70243789Sdim if (__typeCode == null) 71243789Sdim { 72243789Sdim __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_double); 73243789Sdim __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); 74243789Sdim __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.DoubleSeqHelper.id (), "DoubleSeq", __typeCode); 75243789Sdim } 76243789Sdim return __typeCode; 77243789Sdim } 78243789Sdim 79243789Sdim public static String id () 80243789Sdim { 81243789Sdim return _id; 82243789Sdim } 83243789Sdim 84243789Sdim public static double[] read (org.omg.CORBA.portable.InputStream istream) 85243789Sdim { 86243789Sdim double value[] = null; 87243789Sdim int _len0 = istream.read_long (); 88243789Sdim value = new double[_len0]; 89243789Sdim istream.read_double_array (value, 0, _len0); 90243789Sdim return value; 91243789Sdim } 92243789Sdim 93243789Sdim public static void write (org.omg.CORBA.portable.OutputStream ostream, double[] value) 94243789Sdim { 95243789Sdim ostream.write_long (value.length); 96243789Sdim ostream.write_double_array (value, 0, value.length); 97243789Sdim } 98243789Sdim 99243789Sdim} 100243789Sdim