/*
 * @(#)MarshalInputStream.java	1.27 01/12/03
 *
 * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.sun.corba.se.internal.core;

import org.omg.CORBA.TypeCode;
import org.omg.CORBA.Principal;
import org.omg.CORBA.Any;

public interface MarshalInputStream {
    public boolean	read_boolean();
    public char		read_char();
    public char		read_wchar();
    public byte		read_octet();
    public short	read_short();
    public short	read_ushort();
    public int		read_long();
    public int		read_ulong();
    public long		read_longlong();
    public long		read_ulonglong();
    public float	read_float();
    public double	read_double();
    public String	read_string();
    public String	read_wstring();

    public void	read_boolean_array(boolean[] value, int offset, int length);
    public void	read_char_array(char[] value, int offset, int length);
    public void	read_wchar_array(char[] value, int offset, int length);
    public void	read_octet_array(byte[] value, int offset, int length);
    public void	read_short_array(short[] value, int offset, int length);
    public void	read_ushort_array(short[] value, int offset, int length);
    public void	read_long_array(int[] value, int offset, int length);
    public void	read_ulong_array(int[] value, int offset, int length);
    public void	read_longlong_array(long[] value, int offset, int length);
    public void	read_ulonglong_array(long[] value, int offset, int length);
    public void	read_float_array(float[] value, int offset, int length);
    public void	read_double_array(double[] value, int offset, int length);

    public org.omg.CORBA.Object read_Object();
    public TypeCode	read_TypeCode();
    public Any		read_any();
    public Principal	read_Principal();

    /*
     * The methods necessary to support RMI
     */
    public org.omg.CORBA.Object read_Object(Class stubClass);
    public java.io.Serializable read_value() throws Exception;
    
    /* 
     * Additional Methods
     */
    public void consumeEndian();

    // Determines the current byte stream position
    // (also handles fragmented streams)
    public int getPosition();

    // mark/reset from java.io.InputStream
    public void mark(int readAheadLimit);
    public void reset();

    /**
     * This must be called once before unmarshaling valuetypes or anything
     * that uses repository IDs.  The ORB's version should be set
     * to the desired value prior to calling.
     */
    public void performORBVersionSpecificInit();
}
