corba/src/share/classes/com/sun/corba/se/internal/io/IIOPInputStream.java
changeset 5653 954780ba136f
parent 5652 89482b760ef7
parent 5519 09c167b9213e
child 5654 680984fb01fd
equal deleted inserted replaced
5652:89482b760ef7 5653:954780ba136f
     1 /*
       
     2  * Copyright 2003 Sun Microsystems, Inc.  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.  Sun designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
       
    23  * have any questions.
       
    24  */
       
    25 
       
    26 package com.sun.corba.se.internal.io;
       
    27 
       
    28 public class IIOPInputStream {
       
    29     private static native Object allocateNewObject(Class aclass,
       
    30                                                    Class initclass)
       
    31         throws InstantiationException, IllegalAccessException;
       
    32     /* Create a pending exception.  This is needed to get around
       
    33      * the fact that the *Delegate methods do not explicitly
       
    34      * declare that they throw exceptions.
       
    35      *
       
    36      * This native methods creates an exception of the given type with
       
    37      * the given message string and posts it to the pending queue.
       
    38      */
       
    39     private static native void throwExceptionType(Class c, String message);
       
    40 
       
    41     /* The following native methods of the form set*Field are used
       
    42      * to set private, protected, and package private fields
       
    43      * of an Object.
       
    44      */
       
    45     private static native void setObjectField(Object o, Class c, String fieldName, String fieldSig, Object v);
       
    46     private static native void setBooleanField(Object o, Class c, String fieldName, String fieldSig, boolean v);
       
    47     private static native void setByteField(Object o, Class c, String fieldName, String fieldSig, byte v);
       
    48     private static native void setCharField(Object o, Class c, String fieldName, String fieldSig, char v);
       
    49     private static native void setShortField(Object o, Class c, String fieldName, String fieldSig, short v);
       
    50     private static native void setIntField(Object o, Class c, String fieldName, String fieldSig, int v);
       
    51     private static native void setLongField(Object o, Class c, String fieldName, String fieldSig, long v);
       
    52     private static native void setFloatField(Object o, Class c, String fieldName, String fieldSig, float v);
       
    53     private static native void setDoubleField(Object o, Class c, String fieldName, String fieldSig, double v);
       
    54     private static native void readObject(Object obj, Class asClass, Object ois);
       
    55 
       
    56     private static native void setObjectFieldOpt(Object o, long fieldID, Object v);
       
    57     private static native void setBooleanFieldOpt(Object o, long fieldID, boolean v);
       
    58     private static native void setByteFieldOpt(Object o, long fieldID, byte v);
       
    59     private static native void setCharFieldOpt(Object o, long fieldID, char v);
       
    60     private static native void setShortFieldOpt(Object o, long fieldID, short v);
       
    61     private static native void setIntFieldOpt(Object o, long fieldID, int v);
       
    62     private static native void setLongFieldOpt(Object o, long fieldID, long v);
       
    63 
       
    64     private static native void setFloatFieldOpt(Object o, long fieldID, float v);
       
    65     private static native void setDoubleFieldOpt(Object o, long fieldID, double v);
       
    66 }