gnu.CORBA.CDR

Class HeadlessInput

Implemented Interfaces:
AutoCloseable, Closeable, DataInputStream, gnuValueStream, IDLEntity, Serializable, ValueBase

public class HeadlessInput
extends InputStream
implements DataInputStream, gnuValueStream

Substitutes the main stream in factories when the header is already behind. Overrides methods that may be invoked from the factory, forcing not to read the header if called first time on this stream. This stream reverts to default behavior if one or more call are made (reading value types that are nested fields of the value type).

Field Summary

boolean
subsequentCalls
If true, this is not the first call.

Constructor Summary

HeadlessInput(BufferredCdrInput a_stream, InputStream inheritSettings)
Create an instance, reading from the given buffer.

Method Summary

String[]
_truncatable_ids()
Delegates functionality to the underlying stream.
int
available()
Delegates functionality to the underlying stream.
void
close()
Delegates functionality to the underlying stream.
int
getPosition()
Delegates functionality to the underlying stream.
gnuRuntime
getRunTime()
Delegates functionality to the underlying stream.
void
mark(int readlimit)
Delegates functionality to the underlying stream.
boolean
markSupported()
Delegates functionality to the underlying stream.
ORB
orb()
Delegates functionality to the underlying stream.
int
read()
Delegates functionality to the underlying stream.
int
read(byte[] b)
Delegates functionality to the underlying stream.
int
read(byte[] b, int off, int len)
Delegates functionality to the underlying stream.
Object
read_Abstract()
Delegates functionality to the underlying stream.
Context
read_Context()
Delegates functionality to the underlying stream.
Object
read_Object()
Delegates functionality to the underlying stream.
Object
read_Object(Class<T> klass)
Delegates functionality to the underlying stream.
Principal
read_Principal()
Delegates functionality to the underlying stream.
TypeCode
read_TypeCode()
Delegates functionality to the underlying stream.
Serializable
read_Value()
Delegates functionality to read_value.
Object
read_abstract_interface()
Delegates functionality to the underlying stream.
Object
read_abstract_interface(Class<T> clz)
Delegates functionality to the underlying stream.
Any
read_any()
Delegates functionality to the underlying stream.
void
read_any_array(AnySeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
boolean
read_boolean()
Delegates functionality to the underlying stream.
void
read_boolean_array(boolean[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_boolean_array(BooleanSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
char
read_char()
Delegates functionality to the underlying stream.
void
read_char_array(char[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_char_array(CharSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
double
read_double()
Delegates functionality to the underlying stream.
void
read_double_array(double[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_double_array(DoubleSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
BigDecimal
read_fixed()
Delegates functionality to the underlying stream.
float
read_float()
Delegates functionality to the underlying stream.
void
read_float_array(float[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_float_array(FloatSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
int
read_long()
Delegates functionality to the underlying stream.
void
read_long_array(int[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_long_array(LongSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
long
read_longlong()
Delegates functionality to the underlying stream.
void
read_longlong_array(long[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_longlong_array(LongLongSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
byte
read_octet()
Delegates functionality to the underlying stream.
void
read_octet_array(byte[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_octet_array(OctetSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
short
read_short()
Delegates functionality to the underlying stream.
void
read_short_array(ShortSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
void
read_short_array(short[] value, int offset, int length)
Delegates functionality to the underlying stream.
String
read_string()
Delegates functionality to the underlying stream.
int
read_ulong()
Delegates functionality to the underlying stream.
void
read_ulong_array(int[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_ulong_array(ULongSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
long
read_ulonglong()
Delegates functionality to the underlying stream.
void
read_ulonglong_array(long[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_ulonglong_array(ULongLongSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
short
read_ushort()
Delegates functionality to the underlying stream.
void
read_ushort_array(UShortSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
void
read_ushort_array(short[] value, int offset, int length)
Delegates functionality to the underlying stream.
Serializable
read_value()
Delegates functionality to the underlying stream.
Serializable
read_value(Serializable value)
Try to read when having an unitialised value.
Serializable
read_value(Class<T> clz)
Try to read when having an unitialised value.
Serializable
read_value(String repository_id)
Tries to locate a factory using repository id.
Serializable
read_value(BoxedValueHelper helper)
Tries to read using boxed value helper.
char
read_wchar()
Delegates functionality to the underlying stream.
void
read_wchar_array(char[] value, int offset, int length)
Delegates functionality to the underlying stream.
void
read_wchar_array(WCharSeqHolder holder, int offset, int length)
Delegates functionality to the underlying stream.
String
read_wstring()
Delegates functionality to the underlying stream.
void
reset()
Delegates functionality to the underlying stream.
void
seek(int position)
Delegates functionality to the underlying stream.
void
setRunTime(gnuRuntime a_runtime)
Replace the instance of RunTime.
long
skip(long n)
Delegates functionality to the underlying stream.
String
toString()
Get a string representation.

Methods inherited from class org.omg.CORBA_2_3.portable.InputStream

read_abstract_interface, read_value, read_value, read_value, read_value

Methods inherited from class org.omg.CORBA.portable.InputStream

orb, read, read_Context, read_Object, read_Principal, read_TypeCode, read_any, read_boolean, read_boolean_array, read_char, read_char_array, read_double, read_double_array, read_fixed, read_float, read_float_array, read_long, read_long_array, read_longlong, read_longlong_array, read_octet, read_octet_array, read_short, read_short_array, read_string, read_ulong, read_ulong_array, read_ulonglong, read_ulonglong_array, read_ushort, read_ushort_array, read_wchar, read_wchar_array, read_wstring

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

subsequentCalls

public boolean subsequentCalls
If true, this is not the first call.

Constructor Details

HeadlessInput

public HeadlessInput(BufferredCdrInput a_stream,
                     InputStream inheritSettings)
Create an instance, reading from the given buffer.
Parameters:
a_stream - a stream from where the data will be read.
inheritSettings - a stream from that endian and other settings are inherited.

Method Details

_truncatable_ids

public String[] _truncatable_ids()
Delegates functionality to the underlying stream.
Specified by:
_truncatable_ids in interface ValueBase

available

public int available()
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
available in interface InputStream

close

public void close()
            throws IOException
Delegates functionality to the underlying stream.
Specified by:
close in interface Closeable
close in interface AutoCloseable
Overrides:
close in interface InputStream

getPosition

public int getPosition()
Delegates functionality to the underlying stream.
Specified by:
getPosition in interface gnuValueStream

getRunTime

public gnuRuntime getRunTime()
Delegates functionality to the underlying stream.
Specified by:
getRunTime in interface gnuValueStream

mark

public void mark(int readlimit)
Delegates functionality to the underlying stream.
Overrides:
mark in interface InputStream

markSupported

public boolean markSupported()
Delegates functionality to the underlying stream.
Overrides:
markSupported in interface InputStream

orb

public ORB orb()
Delegates functionality to the underlying stream.
Overrides:
orb in interface InputStream

read

public int read()
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
read in interface InputStream

read

public int read(byte[] b)
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
read in interface InputStream

read

public int read(byte[] b,
                int off,
                int len)
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
read in interface InputStream

read_Abstract

public Object read_Abstract()
Delegates functionality to the underlying stream.
Specified by:
read_Abstract in interface DataInputStream

read_Context

public Context read_Context()
Delegates functionality to the underlying stream.
Overrides:
read_Context in interface InputStream

read_Object

public Object read_Object()
Delegates functionality to the underlying stream.
Specified by:
read_Object in interface DataInputStream
Overrides:
read_Object in interface InputStream

read_Object

public Object read_Object(Class<T> klass)
Delegates functionality to the underlying stream.

read_Principal

public Principal read_Principal()
Delegates functionality to the underlying stream.
Overrides:
read_Principal in interface InputStream

read_TypeCode

public TypeCode read_TypeCode()
Delegates functionality to the underlying stream.
Specified by:
read_TypeCode in interface DataInputStream
Overrides:
read_TypeCode in interface InputStream

read_Value

public Serializable read_Value()
Delegates functionality to read_value.
Specified by:
read_Value in interface DataInputStream

read_abstract_interface

public Object read_abstract_interface()
Delegates functionality to the underlying stream.
Overrides:
read_abstract_interface in interface InputStream

read_abstract_interface

public Object read_abstract_interface(Class<T> clz)
Delegates functionality to the underlying stream.

read_any

public Any read_any()
Delegates functionality to the underlying stream.
Specified by:
read_any in interface DataInputStream
Overrides:
read_any in interface InputStream

read_any_array

public void read_any_array(AnySeqHolder holder,
                           int offset,
                           int length)
Delegates functionality to the underlying stream.
Specified by:
read_any_array in interface DataInputStream

read_boolean

public boolean read_boolean()
Delegates functionality to the underlying stream.
Specified by:
read_boolean in interface DataInputStream
Overrides:
read_boolean in interface InputStream

read_boolean_array

public void read_boolean_array(boolean[] value,
                               int offset,
                               int length)
Delegates functionality to the underlying stream.
Overrides:
read_boolean_array in interface InputStream

read_boolean_array

public void read_boolean_array(BooleanSeqHolder holder,
                               int offset,
                               int length)
Delegates functionality to the underlying stream.
Specified by:
read_boolean_array in interface DataInputStream

read_char

public char read_char()
Delegates functionality to the underlying stream.
Specified by:
read_char in interface DataInputStream
Overrides:
read_char in interface InputStream

read_char_array

public void read_char_array(char[] value,
                            int offset,
                            int length)
Delegates functionality to the underlying stream.
Overrides:
read_char_array in interface InputStream

read_char_array

public void read_char_array(CharSeqHolder holder,
                            int offset,
                            int length)
Delegates functionality to the underlying stream.
Specified by:
read_char_array in interface DataInputStream

read_double

public double read_double()
Delegates functionality to the underlying stream.
Specified by:
read_double in interface DataInputStream
Overrides:
read_double in interface InputStream

read_double_array

public void read_double_array(double[] value,
                              int offset,
                              int length)
Delegates functionality to the underlying stream.
Overrides:
read_double_array in interface InputStream

read_double_array

public void read_double_array(DoubleSeqHolder holder,
                              int offset,
                              int length)
Delegates functionality to the underlying stream.
Specified by:
read_double_array in interface DataInputStream

read_fixed

public BigDecimal read_fixed()
Delegates functionality to the underlying stream.
Overrides:
read_fixed in interface InputStream

read_float

public float read_float()
Delegates functionality to the underlying stream.
Specified by:
read_float in interface DataInputStream
Overrides:
read_float in interface InputStream

read_float_array

public void read_float_array(float[] value,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Overrides:
read_float_array in interface InputStream

read_float_array

public void read_float_array(FloatSeqHolder holder,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Specified by:
read_float_array in interface DataInputStream

read_long

public int read_long()
Delegates functionality to the underlying stream.
Specified by:
read_long in interface DataInputStream
Overrides:
read_long in interface InputStream

read_long_array

public void read_long_array(int[] value,
                            int offset,
                            int length)
Delegates functionality to the underlying stream.
Overrides:
read_long_array in interface InputStream

read_long_array

public void read_long_array(LongSeqHolder holder,
                            int offset,
                            int length)
Delegates functionality to the underlying stream.
Specified by:
read_long_array in interface DataInputStream

read_longlong

public long read_longlong()
Delegates functionality to the underlying stream.
Specified by:
read_longlong in interface DataInputStream
Overrides:
read_longlong in interface InputStream

read_longlong_array

public void read_longlong_array(long[] value,
                                int offset,
                                int length)
Delegates functionality to the underlying stream.
Overrides:
read_longlong_array in interface InputStream

read_longlong_array

public void read_longlong_array(LongLongSeqHolder holder,
                                int offset,
                                int length)
Delegates functionality to the underlying stream.
Specified by:
read_longlong_array in interface DataInputStream

read_octet

public byte read_octet()
Delegates functionality to the underlying stream.
Specified by:
read_octet in interface DataInputStream
Overrides:
read_octet in interface InputStream

read_octet_array

public void read_octet_array(byte[] value,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Overrides:
read_octet_array in interface InputStream

read_octet_array

public void read_octet_array(OctetSeqHolder holder,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Specified by:
read_octet_array in interface DataInputStream

read_short

public short read_short()
Delegates functionality to the underlying stream.
Specified by:
read_short in interface DataInputStream
Overrides:
read_short in interface InputStream

read_short_array

public void read_short_array(ShortSeqHolder holder,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Specified by:
read_short_array in interface DataInputStream

read_short_array

public void read_short_array(short[] value,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Overrides:
read_short_array in interface InputStream

read_string

public String read_string()
Delegates functionality to the underlying stream.
Specified by:
read_string in interface DataInputStream
Overrides:
read_string in interface InputStream

read_ulong

public int read_ulong()
Delegates functionality to the underlying stream.
Specified by:
read_ulong in interface DataInputStream
Overrides:
read_ulong in interface InputStream

read_ulong_array

public void read_ulong_array(int[] value,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Overrides:
read_ulong_array in interface InputStream

read_ulong_array

public void read_ulong_array(ULongSeqHolder holder,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Specified by:
read_ulong_array in interface DataInputStream

read_ulonglong

public long read_ulonglong()
Delegates functionality to the underlying stream.
Specified by:
read_ulonglong in interface DataInputStream
Overrides:
read_ulonglong in interface InputStream

read_ulonglong_array

public void read_ulonglong_array(long[] value,
                                 int offset,
                                 int length)
Delegates functionality to the underlying stream.
Overrides:
read_ulonglong_array in interface InputStream

read_ulonglong_array

public void read_ulonglong_array(ULongLongSeqHolder holder,
                                 int offset,
                                 int length)
Delegates functionality to the underlying stream.
Specified by:
read_ulonglong_array in interface DataInputStream

read_ushort

public short read_ushort()
Delegates functionality to the underlying stream.
Specified by:
read_ushort in interface DataInputStream
Overrides:
read_ushort in interface InputStream

read_ushort_array

public void read_ushort_array(UShortSeqHolder holder,
                              int offset,
                              int length)
Delegates functionality to the underlying stream.
Specified by:
read_ushort_array in interface DataInputStream

read_ushort_array

public void read_ushort_array(short[] value,
                              int offset,
                              int length)
Delegates functionality to the underlying stream.
Overrides:
read_ushort_array in interface InputStream

read_value

public Serializable read_value()
Delegates functionality to the underlying stream.
Overrides:
read_value in interface InputStream

read_value

public Serializable read_value(Serializable value)
Try to read when having an unitialised value.
Overrides:
read_value in interface InputStream

read_value

public Serializable read_value(Class<T> clz)
Try to read when having an unitialised value.

read_value

public Serializable read_value(String repository_id)
Tries to locate a factory using repository id.
Overrides:
read_value in interface InputStream

read_value

public Serializable read_value(BoxedValueHelper helper)
Tries to read using boxed value helper.
Overrides:
read_value in interface InputStream

read_wchar

public char read_wchar()
Delegates functionality to the underlying stream.
Specified by:
read_wchar in interface DataInputStream
Overrides:
read_wchar in interface InputStream

read_wchar_array

public void read_wchar_array(char[] value,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Overrides:
read_wchar_array in interface InputStream

read_wchar_array

public void read_wchar_array(WCharSeqHolder holder,
                             int offset,
                             int length)
Delegates functionality to the underlying stream.
Specified by:
read_wchar_array in interface DataInputStream

read_wstring

public String read_wstring()
Delegates functionality to the underlying stream.
Specified by:
read_wstring in interface DataInputStream
Overrides:
read_wstring in interface InputStream

reset

public void reset()
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
reset in interface InputStream

seek

public void seek(int position)
Delegates functionality to the underlying stream.
Specified by:
seek in interface gnuValueStream

setRunTime

public void setRunTime(gnuRuntime a_runtime)
Replace the instance of RunTime.
Specified by:
setRunTime in interface gnuValueStream

skip

public long skip(long n)
            throws IOException
Delegates functionality to the underlying stream.
Overrides:
skip in interface InputStream

toString

public String toString()
Get a string representation.
Overrides:
toString in interface Object

HeadlessInput.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.