gnu.javax.rmi.CORBA

Class CorbaInput

Implemented Interfaces:
AutoCloseable, Closeable, DataInput, ObjectInput, ObjectStreamConstants

public class CorbaInput
extends ObjectInputStream
implements ObjectInput

Converts calls on java ObjectOutputStream to calls on CORBA OutputStream. A class to substitute for objects using readObject method.

Nested Class Summary

Nested classes/interfaces inherited from class java.io.ObjectInputStream

ObjectInputStream.GetField

Field Summary

InputStream
stream
The underlying CORBA stream from where the actual input is taken.

Fields inherited from interface java.io.ObjectStreamConstants

PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING, baseWireHandle

Constructor Summary

CorbaInput(InputStream an_input, Object firstObject, RmiUtilities an_util, int an_offset, String a_rid, gnuRuntime a_runtime)
Create an instance, delegating calls to the given CORBA stream.

Method Summary

int
available()
void
close()
No action.
void
defaultReadObject()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] buf, int off, int len)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] buf)
void
readFully(byte[] buf, int off, int len)
int
readInt()
String
readLine()
long
readLong()
protected Object
readObjectOverride()
Objects are read as abstract interfaces.
String
readUTF()
Read as wide string (not as UTF).
int
readUnsignedByte()
int
readUnsignedShort()
short
read_short()
void
reset()
long
skip(long n)
int
skipBytes(int len)

Methods inherited from class java.io.ObjectInputStream

available, close, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUTF, readUnshared, readUnsignedByte, readUnsignedShort, registerValidation, resolveClass, resolveObject, resolveProxyClass, skipBytes

Methods inherited from class java.io.InputStream

available, close, mark, markSupported, read, read, read, reset, skip

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

stream

public InputStream stream
The underlying CORBA stream from where the actual input is taken.

Constructor Details

CorbaInput

public CorbaInput(InputStream an_input,
                  Object firstObject,
                  RmiUtilities an_util,
                  int an_offset,
                  String a_rid,
                  gnuRuntime a_runtime)
            throws Exception
Create an instance, delegating calls to the given CORBA stream.

Method Details

available

public int available()
            throws IOException
Specified by:
available in interface ObjectInput
Overrides:
available in interface ObjectInputStream

close

public void close()
            throws IOException
No action.
Specified by:
close in interface ObjectInput
close in interface AutoCloseable
close in interface Closeable
Overrides:
close in interface ObjectInputStream

defaultReadObject

public void defaultReadObject()
            throws IOException,
                   ClassNotFoundException
Overrides:
defaultReadObject in interface ObjectInputStream

mark

public void mark(int readlimit)
Overrides:
mark in interface InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in interface InputStream

read

public int read()
            throws IOException
Specified by:
read in interface ObjectInput
Overrides:
read in interface ObjectInputStream

read

public int read(byte[] b)
            throws IOException
Specified by:
read in interface ObjectInput
Overrides:
read in interface InputStream

read

public int read(byte[] buf,
                int off,
                int len)
            throws IOException
Specified by:
read in interface ObjectInput
Overrides:
read in interface ObjectInputStream

readBoolean

public boolean readBoolean()
            throws IOException
Specified by:
readBoolean in interface DataInput
Overrides:
readBoolean in interface ObjectInputStream

readByte

public byte readByte()
            throws IOException
Specified by:
readByte in interface DataInput
Overrides:
readByte in interface ObjectInputStream

readChar

public char readChar()
            throws IOException
Specified by:
readChar in interface DataInput
Overrides:
readChar in interface ObjectInputStream

readDouble

public double readDouble()
            throws IOException
Specified by:
readDouble in interface DataInput
Overrides:
readDouble in interface ObjectInputStream

readFloat

public float readFloat()
            throws IOException
Specified by:
readFloat in interface DataInput
Overrides:
readFloat in interface ObjectInputStream

readFully

public void readFully(byte[] buf)
            throws IOException
Specified by:
readFully in interface DataInput

readFully

public void readFully(byte[] buf,
                      int off,
                      int len)
            throws IOException
Specified by:
readFully in interface DataInput

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface DataInput
Overrides:
readInt in interface ObjectInputStream

readLine

public String readLine()
            throws IOException
Specified by:
readLine in interface DataInput
Overrides:
readLine in interface ObjectInputStream

readLong

public long readLong()
            throws IOException
Specified by:
readLong in interface DataInput
Overrides:
readLong in interface ObjectInputStream

readObjectOverride

protected Object readObjectOverride()
            throws IOException,
                   ClassNotFoundException
Objects are read as abstract interfaces.
Overrides:
readObjectOverride in interface ObjectInputStream

readUTF

public String readUTF()
            throws IOException
Read as wide string (not as UTF).
Specified by:
readUTF in interface DataInput
Overrides:
readUTF in interface ObjectInputStream

readUnsignedByte

public int readUnsignedByte()
            throws IOException
Specified by:
readUnsignedByte in interface DataInput
Overrides:
readUnsignedByte in interface ObjectInputStream

readUnsignedShort

public int readUnsignedShort()
            throws IOException
Specified by:
readUnsignedShort in interface DataInput
Overrides:
readUnsignedShort in interface ObjectInputStream

read_short

public short read_short()
            throws IOException

reset

public void reset()
            throws IOException
Overrides:
reset in interface InputStream

skip

public long skip(long n)
            throws IOException
Specified by:
skip in interface ObjectInput
Overrides:
skip in interface InputStream

skipBytes

public int skipBytes(int len)
            throws IOException
Specified by:
skipBytes in interface DataInput
Overrides:
skipBytes in interface ObjectInputStream

CorbaInput.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.