1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/org/omg/CORBA/WCharSeqHelper.java Wed Apr 27 01:21:28 2016 +0800 1.3 @@ -0,0 +1,99 @@ 1.4 +/* 1.5 + * Copyright (c) 1999, 2001, Oracle and/or its affiliates. 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. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 +package org.omg.CORBA; 1.29 + 1.30 + 1.31 +/** 1.32 +* The Helper for <tt>WCharSeq</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/WCharSeqHelper.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 WCharSeqHelper 1.54 +{ 1.55 + private static String _id = "IDL:omg.org/CORBA/WCharSeq:1.0"; 1.56 + 1.57 + public static void insert (org.omg.CORBA.Any a, char[] 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 char[] 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_wchar); 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.WCharSeqHelper.id (), "WCharSeq", __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 char[] read (org.omg.CORBA.portable.InputStream istream) 1.88 + { 1.89 + char value[] = null; 1.90 + int _len0 = istream.read_long (); 1.91 + value = new char[_len0]; 1.92 + istream.read_wchar_array (value, 0, _len0); 1.93 + return value; 1.94 + } 1.95 + 1.96 + public static void write (org.omg.CORBA.portable.OutputStream ostream, char[] value) 1.97 + { 1.98 + ostream.write_long (value.length); 1.99 + ostream.write_wchar_array (value, 0, value.length); 1.100 + } 1.101 + 1.102 +}