edu.toronto.cs.util
Class MarshaledInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by edu.toronto.cs.util.MarshaledInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput

public class MarshaledInputStream
extends java.io.InputStream
implements java.io.DataInput


Constructor Summary
MarshaledInputStream(java.io.InputStream _in)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int v)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 byte[] readByteArray()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] param1)
           
 void readFully(byte[] param1, int param2, int param3)
           
 int readInt()
           
 int[] readIntArray()
           
 int[] readIntArrayFixed(int size)
           
 java.lang.String readLine()
           
 long readLong()
           
 short readShort()
           
 java.lang.String readString()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void reset()
           
 long skip(long n)
           
 int skipBytes(int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshaledInputStream

public MarshaledInputStream(java.io.InputStream _in)
Method Detail

readString

public java.lang.String readString()
                            throws java.io.IOException
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readInt

public int readInt()
            throws java.io.IOException
Specified by:
readInt in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readByte

public byte readByte()
              throws java.io.IOException
Specified by:
readByte in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readShort

public short readShort()
                throws java.io.IOException
Specified by:
readShort in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readChar

public char readChar()
              throws java.io.IOException
Specified by:
readChar in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readFloat

public float readFloat()
                throws java.io.IOException
Specified by:
readFloat in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readFully

public void readFully(byte[] param1)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Parameters:
param1 -
Throws:
java.io.IOException -

readFully

public void readFully(byte[] param1,
                      int param2,
                      int param3)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Parameters:
param1 -
param2 -
param3 -
Throws:
java.io.IOException -

skipBytes

public int skipBytes(int n)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Parameters:
param1 -
Returns:
Throws:
java.io.IOException -

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Specified by:
readBoolean in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Specified by:
readUnsignedByte in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Specified by:
readUnsignedShort in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readLong

public long readLong()
              throws java.io.IOException
Specified by:
readLong in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readDouble

public double readDouble()
                  throws java.io.IOException
Specified by:
readDouble in interface java.io.DataInput
Returns:
Throws:
java.io.IOException -

readByteArray

public byte[] readByteArray()
                     throws java.io.IOException
Throws:
java.io.IOException

readIntArray

public int[] readIntArray()
                   throws java.io.IOException
Throws:
java.io.IOException

readIntArrayFixed

public int[] readIntArrayFixed(int size)
                        throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Returns:
Throws:
java.io.IOException -

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

mark

public void mark(int v)
Overrides:
mark in class java.io.InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException