jdk/src/java.management/share/classes/com/sun/jmx/remote/protocol/iiop/ProxyInputStream.java
changeset 32751 38184f604d96
parent 32750 e90079907456
parent 32712 f61a63b7d1e5
child 32752 43c458023730
child 32827 b00f765af244
equal deleted inserted replaced
32750:e90079907456 32751:38184f604d96
     1 /*
       
     2  * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Oracle designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Oracle in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  */
       
    25 
       
    26 package com.sun.jmx.remote.protocol.iiop;
       
    27 
       
    28 import java.io.IOException;
       
    29 import java.io.Serializable;
       
    30 import java.math.BigDecimal;
       
    31 
       
    32 import org.omg.CORBA.Any;
       
    33 import org.omg.CORBA.Context;
       
    34 import org.omg.CORBA.NO_IMPLEMENT;
       
    35 import org.omg.CORBA.ORB;
       
    36 import org.omg.CORBA.TypeCode;
       
    37 import org.omg.CORBA.portable.BoxedValueHelper;
       
    38 
       
    39 @SuppressWarnings({"deprecation", "rawtypes"})
       
    40 public class ProxyInputStream extends org.omg.CORBA_2_3.portable.InputStream {
       
    41     public ProxyInputStream(org.omg.CORBA.portable.InputStream in) {
       
    42         this.in = in;
       
    43     }
       
    44 
       
    45     public boolean read_boolean() {
       
    46         return in.read_boolean();
       
    47     }
       
    48 
       
    49     public char read_char() {
       
    50         return in.read_char();
       
    51     }
       
    52 
       
    53     public char read_wchar() {
       
    54         return in.read_wchar();
       
    55     }
       
    56 
       
    57     public byte read_octet() {
       
    58         return in.read_octet();
       
    59     }
       
    60 
       
    61     public short read_short() {
       
    62         return in.read_short();
       
    63     }
       
    64 
       
    65     public short read_ushort() {
       
    66         return in.read_ushort();
       
    67     }
       
    68 
       
    69     public int read_long() {
       
    70         return in.read_long();
       
    71     }
       
    72 
       
    73     public int read_ulong() {
       
    74         return in.read_ulong();
       
    75     }
       
    76 
       
    77     public long read_longlong() {
       
    78         return in.read_longlong();
       
    79     }
       
    80 
       
    81     public long read_ulonglong() {
       
    82         return in.read_ulonglong();
       
    83     }
       
    84 
       
    85     public float read_float() {
       
    86         return in.read_float();
       
    87     }
       
    88 
       
    89     public double read_double() {
       
    90         return in.read_double();
       
    91     }
       
    92 
       
    93     public String read_string() {
       
    94         return in.read_string();
       
    95     }
       
    96 
       
    97     public String read_wstring() {
       
    98         return in.read_wstring();
       
    99     }
       
   100 
       
   101     public void read_boolean_array(boolean[] value, int offset, int length) {
       
   102         in.read_boolean_array(value, offset, length);
       
   103     }
       
   104 
       
   105     public void read_char_array(char[] value, int offset, int length) {
       
   106         in.read_char_array(value, offset, length);
       
   107     }
       
   108 
       
   109     public void read_wchar_array(char[] value, int offset, int length) {
       
   110         in.read_wchar_array(value, offset, length);
       
   111     }
       
   112 
       
   113     public void read_octet_array(byte[] value, int offset, int length) {
       
   114         in.read_octet_array(value, offset, length);
       
   115     }
       
   116 
       
   117     public void read_short_array(short[] value, int offset, int length) {
       
   118         in.read_short_array(value, offset, length);
       
   119     }
       
   120 
       
   121     public void read_ushort_array(short[] value, int offset, int length) {
       
   122         in.read_ushort_array(value, offset, length);
       
   123     }
       
   124 
       
   125     public void read_long_array(int[] value, int offset, int length) {
       
   126         in.read_long_array(value, offset, length);
       
   127     }
       
   128 
       
   129     public void read_ulong_array(int[] value, int offset, int length) {
       
   130         in.read_ulong_array(value, offset, length);
       
   131     }
       
   132 
       
   133     public void read_longlong_array(long[] value, int offset, int length) {
       
   134         in.read_longlong_array(value, offset, length);
       
   135     }
       
   136 
       
   137     public void read_ulonglong_array(long[] value, int offset, int length) {
       
   138         in.read_ulonglong_array(value, offset, length);
       
   139     }
       
   140 
       
   141     public void read_float_array(float[] value, int offset, int length) {
       
   142         in.read_float_array(value, offset, length);
       
   143     }
       
   144 
       
   145     public void read_double_array(double[] value, int offset, int length) {
       
   146         in.read_double_array(value, offset, length);
       
   147     }
       
   148 
       
   149     public org.omg.CORBA.Object read_Object() {
       
   150         return in.read_Object();
       
   151     }
       
   152 
       
   153     public TypeCode read_TypeCode() {
       
   154         return in.read_TypeCode();
       
   155     }
       
   156 
       
   157     public Any read_any() {
       
   158         return in.read_any();
       
   159     }
       
   160 
       
   161     /**
       
   162      * @deprecated
       
   163      */
       
   164     @Override
       
   165     @Deprecated
       
   166     public org.omg.CORBA.Principal read_Principal() {
       
   167         return in.read_Principal();
       
   168     }
       
   169 
       
   170     @Override
       
   171     public int read() throws IOException {
       
   172         return in.read();
       
   173     }
       
   174 
       
   175     @Override
       
   176     public BigDecimal read_fixed() {
       
   177         return in.read_fixed();
       
   178     }
       
   179 
       
   180     @Override
       
   181     public Context read_Context() {
       
   182         return in.read_Context();
       
   183     }
       
   184 
       
   185     @Override
       
   186     public org.omg.CORBA.Object read_Object(java.lang.Class clz) {
       
   187         return in.read_Object(clz);
       
   188     }
       
   189 
       
   190     @Override
       
   191     public ORB orb() {
       
   192         return in.orb();
       
   193     }
       
   194 
       
   195     @Override
       
   196     public Serializable read_value() {
       
   197         return narrow().read_value();
       
   198     }
       
   199 
       
   200     @Override
       
   201     public Serializable read_value(Class clz) {
       
   202         return narrow().read_value(clz);
       
   203     }
       
   204 
       
   205     @Override
       
   206     public Serializable read_value(BoxedValueHelper factory) {
       
   207         return narrow().read_value(factory);
       
   208     }
       
   209 
       
   210     @Override
       
   211     public Serializable read_value(String rep_id) {
       
   212         return narrow().read_value(rep_id);
       
   213     }
       
   214 
       
   215     @Override
       
   216     public Serializable read_value(Serializable value) {
       
   217         return narrow().read_value(value);
       
   218     }
       
   219 
       
   220     @Override
       
   221     public Object read_abstract_interface() {
       
   222         return narrow().read_abstract_interface();
       
   223     }
       
   224 
       
   225     @Override
       
   226     public Object read_abstract_interface(Class clz) {
       
   227         return narrow().read_abstract_interface(clz);
       
   228     }
       
   229 
       
   230     protected org.omg.CORBA_2_3.portable.InputStream narrow() {
       
   231         if (in instanceof org.omg.CORBA_2_3.portable.InputStream)
       
   232             return (org.omg.CORBA_2_3.portable.InputStream) in;
       
   233         throw new NO_IMPLEMENT();
       
   234     }
       
   235 
       
   236     public org.omg.CORBA.portable.InputStream getProxiedInputStream() {
       
   237         return in;
       
   238     }
       
   239 
       
   240     protected final org.omg.CORBA.portable.InputStream in;
       
   241 }