FileDocCategorySizeDatePackage
WrapperInputStream.javaAPI DocJava SE 5 API7810Fri Aug 26 14:54:22 BST 2005com.sun.corba.se.impl.encoding

WrapperInputStream

public class WrapperInputStream extends org.omg.CORBA_2_3.portable.InputStream implements TypeCodeReader

Fields Summary
private com.sun.corba.se.impl.encoding.CDRInputStream
stream
private Map
typeMap
private int
startPos
Constructors Summary
public WrapperInputStream(com.sun.corba.se.impl.encoding.CDRInputStream s)


       
        super();
        stream = s;
        startPos = stream.getPosition();
    
Methods Summary
public voidaddTypeCodeAtPosition(com.sun.corba.se.impl.corba.TypeCodeImpl tc, int position)

        if (typeMap == null) {
            //if (TypeCodeImpl.debug) System.out.println("Creating typeMap");
            typeMap = new HashMap(16);
        }
        //if (TypeCodeImpl.debug) System.out.println(this + " adding tc " + tc + " at position " + position);
        typeMap.put(new Integer(position), tc);
    
public intavailable()

 return stream.available(); 
public voidclose()

 stream.close(); 
public voidconsumeEndian()

 stream.consumeEndian(); 
public intgetPosition()

 return stream.getPosition(); 
public intgetTopLevelPosition()

        //if (TypeCodeImpl.debug) System.out.println("WrapperInputStream.getTopLevelPosition " +
            //"returning getPosition " + getPosition() + " - startPos " + startPos +
            //" = " + (getPosition() - startPos));
        return getPosition() - startPos;
    
public TypeCodeReadergetTopLevelStream()

        // WrapperInputStream has no enclosure
        return this;
    
public com.sun.corba.se.impl.corba.TypeCodeImplgetTypeCodeAtPosition(int position)

        if (typeMap == null)
	    return null;
        //if (TypeCodeImpl.debug) System.out.println("Getting tc " + (TypeCodeImpl)typeMap.get(new Integer(position)) +
            //" at position " + position);
        return (TypeCodeImpl)typeMap.get(new Integer(position));
    
public voidmark(int readlimit)

 stream.mark(readlimit); 
public booleanmarkSupported()

 return stream.markSupported(); 
public org.omg.CORBA.ORBorb()

 return stream.orb(); 
public voidperformORBVersionSpecificInit()

        // This is never actually called on a WrapperInputStream, but
        // exists to satisfy the interface requirement.
        stream.performORBVersionSpecificInit();
    
public voidprintTypeMap()

        System.out.println("typeMap = {");
        List sortedKeys = new ArrayList(typeMap.keySet());
        Collections.sort(sortedKeys);
        Iterator i = sortedKeys.iterator();
        while (i.hasNext()) {
            Integer pos = (Integer)i.next();
            TypeCodeImpl tci = (TypeCodeImpl)typeMap.get(pos);
            System.out.println("  key = " + pos.intValue() + ", value = " + tci.description());
        }
        System.out.println("}");
    
public intread()

 return stream.read(); 
public intread(byte[] b)

 return stream.read(b); 
public intread(byte[] b, int off, int len)

	return stream.read(b, off, len);
    
public org.omg.CORBA.Contextread_Context()

 return stream.read_Context(); 
public org.omg.CORBA.Objectread_Object()

 return stream.read_Object(); 
public org.omg.CORBA.Principalread_Principal()

 return stream.read_Principal(); 
public org.omg.CORBA.TypeCoderead_TypeCode()

 return stream.read_TypeCode(); 
public org.omg.CORBA.Anyread_any()

 return stream.read_any(); 
public booleanread_boolean()

 return stream.read_boolean(); 
public voidread_boolean_array(boolean[] value, int offset, int length)

	stream.read_boolean_array(value, offset, length);
    
public charread_char()

 return stream.read_char(); 
public voidread_char_array(char[] value, int offset, int length)

	stream.read_char_array(value, offset, length);
    
public doubleread_double()

 return stream.read_double(); 
public voidread_double_array(double[] value, int offset, int length)

	stream.read_double_array(value, offset, length);
    
public java.math.BigDecimalread_fixed()

 return stream.read_fixed(); 
public floatread_float()

 return stream.read_float(); 
public voidread_float_array(float[] value, int offset, int length)

	stream.read_float_array(value, offset, length);
    
public intread_long()

 return stream.read_long(); 
public voidread_long_array(int[] value, int offset, int length)

	stream.read_long_array(value, offset, length);
    
public longread_longlong()

 return stream.read_longlong(); 
public voidread_longlong_array(long[] value, int offset, int length)

	stream.read_longlong_array(value, offset, length);
    
public byteread_octet()

 return stream.read_octet(); 
public voidread_octet_array(byte[] value, int offset, int length)

	stream.read_octet_array(value, offset, length);
    
public shortread_short()

 return stream.read_short(); 
public voidread_short_array(short[] value, int offset, int length)

	stream.read_short_array(value, offset, length);
    
public java.lang.Stringread_string()

 return stream.read_string(); 
public intread_ulong()

 return stream.read_ulong(); 
public voidread_ulong_array(int[] value, int offset, int length)

	stream.read_ulong_array(value, offset, length);
    
public longread_ulonglong()

 return stream.read_ulonglong(); 
public voidread_ulonglong_array(long[] value, int offset, int length)

	stream.read_ulonglong_array(value, offset, length);
    
public shortread_ushort()

 return stream.read_ushort(); 
public voidread_ushort_array(short[] value, int offset, int length)

	stream.read_ushort_array(value, offset, length);
    
public java.io.Serializableread_value()

return stream.read_value();
public charread_wchar()

 return stream.read_wchar(); 
public voidread_wchar_array(char[] value, int offset, int length)

	stream.read_wchar_array(value, offset, length);
    
public java.lang.Stringread_wstring()

 return stream.read_wstring(); 
public voidreset()

 stream.reset(); 
public voidresetCodeSetConverters()

        stream.resetCodeSetConverters();
    
public voidsetEnclosingInputStream(org.omg.CORBA_2_3.portable.InputStream enclosure)

        // WrapperInputStream has no enclosure
    
public longskip(long n)

 return stream.skip(n);