<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.ObjectInputStream
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.LineNumberReader.html#_top_">Previous</a>  <a href="java.io.ObjectOutputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.ObjectInputStream
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.InputStream.html#_top_">java.io.InputStream</a>
           |
           +----java.io.ObjectInputStream
</pre>
<hr>
<dl>
  <dt> public class <b>ObjectInputStream</b>
  <dt> extends <a href="java.io.InputStream.html#_top_">InputStream</a>
  <dt> implements <a href="java.io.ObjectInput.html#_top_">ObjectInput</a>, ObjectStreamConstants
</dl>
An ObjectInputStream deserializes primitive data and objects previously
 written using an ObjectOutputStream.
 ObjectOutputStream and ObjectInputStream can provide an application
 with persistent storage for graphs of objects when used with a
 FileOutputStream and FileInputStream respectively.
 ObjectInputStream is used to recover those objects previously
 serialized. Other uses include passing objects between hosts using
 a socket stream or for marshaling and unmarshaling arguments and
 parameters in a remote communication system.<p>
 ObjectInputStream ensures that the types of all objects in the
 graph created from the stream match the classes present in the
 Java Virtual Machine.  Classes are loaded as required using the
 standard mechanisms. <p>
 Only objects that support the java.io.Serializable or
 java.io.Externalizable interface can be read from streams.
 The method <STRONG>readObject</STRONG> is used to read an object
 from the stream.  Java's safe casting should be used to get the
 desired type.  In Java, strings and arrays are objects and are
 treated as objects during serialization. When read they need to be
 cast to the expected type.<p>
 Primitive data types can be read from the stream using the appropriate
 method on DataInput. <p>
 The default deserialization mechanism for objects restores the
 contents of each field to the value and type it had when it was written.
 Fields declared as transient or static are ignored by the
 deserialization process.  References to other objects cause those
 objects to be read from the stream as necessary.  Graphs of objects
 are restored correctly using a reference sharing mechanism.  New
 objects are always allocated when deserializing, which prevents
 existing objects from being overwritten. <p>
 Reading an object is analogous to running the constructors of a new
 object.  Memory is allocated for the object and initialized to zero
 (NULL).  No-arg constructors are invoked for the non-serializable
 classes and then the fields of the serializable classes are
 restored from the stream starting with the serializable class closest to
 java.lang.object and finishing with the object's most specifiec
 class. <p>
 For example to read from a stream as written by the example in
 ObjectOutputStream: <br>
 <PRE>
	FileInputStream istream = new FileInputStream("t.tmp");
	ObjectInputStream p = new ObjectInputStream(istream);
	int i = p.readInt();
	String today = (String)p.readObject();
	Date date = (Date)p.readObject();
	istream.close();
 </PRE>
 Classes control how they are serialized by implementing either the
 java.io.Serializable or java.io.Externalizable interfaces.<P>
 Implementing the Serializable interface allows object serialization
 to save and restore the entire state of the object and it allows
 classes to evolve between the time the stream is written and the time it is
 read.  It automatically traverses references between objects,
 saving and restoring entire graphs.
 Serializable classes that require special handling during the
 serialization and deserialization process should implement both
 of these methods:<p>
 <PRE>
 private void writeObject(java.io.ObjectOutputStream stream)
     throws IOException;
 private void readObject(java.io.ObjectInputStream stream)
     throws IOException, ClassNotFoundException; 
 </PRE><p>
 The readObject method is responsible for reading and restoring the
 state of the object for its particular class using data written to
 the stream by the corresponding writeObject method.  The method
 does not need to concern itself with the state belonging to its
 superclasses or subclasses.  State is restored by reading data from
 the ObjectInputStream for the individual fields and making
 assignments to the appropriate fields of the object.  Reading
 primitive data types is supported by DataInput. <p>
 Serialization does not read or assign values to the fields of any
 object that does not implement the java.io.Serializable interface.
 Subclasses of Objects that are not serializable can be
 serializable. In this case the non-serializable class must have a
 no-arg constructor to allow its fields to be initialized.  In this
 case it is the responsibility of the subclass to save and restore
 the state of the non-serializable class. It is frequently the case that
 the fields of that class are accessible (public, package, or
 protected) or that there are get and set methods that can be used
 to restore the state. <p>
 Any exception that occurs while deserializing an object will be
 caught by the ObjectInputStream and abort the reading process. <p>
 Implementing the Externalizable interface allows the object to
 assume complete control over the contents and format of the object's
 serialized form.  The methods of the Externalizable interface,
 writeExternal and readExternal, are called to save and restore the
 objects state.  When implemented by a class they can write and read
 their own state using all of the methods of ObjectOutput and
 ObjectInput.  It is the responsibility of the objects to handle any
 versioning that occurs.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.DataInput.html#_top_">DataInput</a>, <a href="java.io.ObjectOutputStream.html#_top_">ObjectOutputStream</a>, <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ObjectInputStream(java.io.InputStream)"><b>ObjectInputStream</b></a>(InputStream)
  <dd>  Create an ObjectInputStream that reads from the specified InputStream.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#available()"><b>available</b></a>()
  <dd>  Returns the number of bytes that can be read without blocking.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Closes the input stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#defaultReadObject()"><b>defaultReadObject</b></a>()
  <dd>  Read the non-static and non-transient fields of the current class
 from this stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#enableResolveObject(boolean)"><b>enableResolveObject</b></a>(boolean)
  <dd>  Enable the stream to allow objects read from the stream to be replaced.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read()"><b>read</b></a>()
  <dd>  Reads a byte of data.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(byte[], int, int)"><b>read</b></a>(byte[], int, int)
  <dd>  Reads into an array of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readBoolean()"><b>readBoolean</b></a>()
  <dd>  Reads in a boolean.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readByte()"><b>readByte</b></a>()
  <dd>  Reads an 8 bit byte.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readChar()"><b>readChar</b></a>()
  <dd>  Reads a 16 bit char.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readDouble()"><b>readDouble</b></a>()
  <dd>  Reads a 64 bit double.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFloat()"><b>readFloat</b></a>()
  <dd>  Reads a 32 bit float.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFully(byte[])"><b>readFully</b></a>(byte[])
  <dd>  Reads bytes, blocking until all bytes are read.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFully(byte[], int, int)"><b>readFully</b></a>(byte[], int, int)
  <dd>  Reads bytes, blocking until all bytes are read.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readInt()"><b>readInt</b></a>()
  <dd>  Reads a 32 bit int.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readLine()"><b>readLine</b></a>()
  <dd>  Reads in a line that has been terminated by a \n, \r, 
 \r\n or EOF.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readLong()"><b>readLong</b></a>()
  <dd>  Reads a 64 bit long.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readObject()"><b>readObject</b></a>()
  <dd>  Read an object from the ObjectInputStream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readShort()"><b>readShort</b></a>()
  <dd>  Reads a 16 bit short.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readStreamHeader()"><b>readStreamHeader</b></a>()
  <dd>  The readStreamHeader method is provided to allow subclasses to
 read and verify their own stream headers.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUnsignedByte()"><b>readUnsignedByte</b></a>()
  <dd>  Reads an unsigned 8 bit byte.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUnsignedShort()"><b>readUnsignedShort</b></a>()
  <dd>  Reads an unsigned 16 bit short.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUTF()"><b>readUTF</b></a>()
  <dd>  Reads a UTF format String.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#registerValidation(java.io.ObjectInputValidation, int)"><b>registerValidation</b></a>(ObjectInputValidation, int)
  <dd>  Register an object to be validated before the graph is
 returned.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#resolveClass(java.io.ObjectStreamClass)"><b>resolveClass</b></a>(ObjectStreamClass)
  <dd>  Subclasses may implement this method to allow classes to be
 fetched from an alternate source.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#resolveObject(java.lang.Object)"><b>resolveObject</b></a>(Object)
  <dd>  This method will allow trusted subclasses of ObjectInputStream
 to substitute one object for another during
 deserialization.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#skipBytes(int)"><b>skipBytes</b></a>(int)
  <dd>  Skips bytes, block until all bytes are skipped.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="ObjectInputStream"></a>
<a name="ObjectInputStream(java.io.InputStream)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>ObjectInputStream</b>
<pre>
 public ObjectInputStream(<a href="java.io.InputStream.html#_top_">InputStream</a> in) throws <a href="java.io.IOException.html#_top_">IOException</a>, <a href="java.io.StreamCorruptedException.html#_top_">StreamCorruptedException</a>
</pre>
<dl>
  <dd> Create an ObjectInputStream that reads from the specified InputStream.
 The stream header containing the magic number and version number
 are read from the stream and verified. This method will block
 until the corresponding ObjectOutputStream has written and flushed the header.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.StreamCorruptedException.html#_top_">StreamCorruptedException</a>
    <dd> The version or magic number are incorrect.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> An exception occurred in the underlying stream.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="readObject()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readObject"><b>readObject</b></a>
<pre>
 public final <a href="java.lang.Object.html#_top_">Object</a> readObject() throws <a href="java.io.OptionalDataException.html#_top_">OptionalDataException</a>, <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>, <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Read an object from the ObjectInputStream.
 The class of the object, the signature of the class, and the values
 of the non-transient and non-static fields of the class and all
 of its supertypes are read.  Default deserializing for a class can be
 overriden using the writeObject and readObject methods.
 Objects referenced by this object are read transitively so
 that a complete equivalent graph of objects is reconstructed by readObject. <p>
 The root object is completly restored when all of its fields
 and the objects it references are completely restored.  At this
 point the object validation callbacks are executed in order
 based on their registered priorities. The callbacks are
 registered by objects (in the readObject special methods)
 as they are individually restored.
 Exceptions are thrown for problems with the InputStream and for classes
 that should not be deserialized.  All exceptions are fatal to the 
 InputStream and leave it in an indeterminate state; it is up to the caller
 to ignore or recover the stream state.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>
    <dd> Class of a serialized object
      cannot be found.
    <dt> <b>Throws:</b> <a href="java.io.InvalidClassException.html#_top_">InvalidClassException</a>
    <dd> Something is wrong with a class used by
     serialization.
    <dt> <b>Throws:</b> <a href="java.io.StreamCorruptedException.html#_top_">StreamCorruptedException</a>
    <dd> Control information in the
     stream is inconsistent.
    <dt> <b>Throws:</b> <a href="java.io.OptionalDataException.html#_top_">OptionalDataException</a>
    <dd> Primitive data was found in the
 stream instead of objects.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> Any of the usual Input/Output related exceptions.
  </dl></dd>
</dl>
<a name="defaultReadObject()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="defaultReadObject"><b>defaultReadObject</b></a>
<pre>
 public final void defaultReadObject() throws <a href="java.io.IOException.html#_top_">IOException</a>, <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>, <a href="java.io.NotActiveException.html#_top_">NotActiveException</a>
</pre>
<dl>
  <dd> Read the non-static and non-transient fields of the current class
 from this stream.  This may only be called from the readObject method
 of the class being deserialized. It will throw the NotActiveException
 if it is called otherwise.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>
    <dd> if the class of a serialized
              object could not be found.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Throws:</b> <a href="java.io.NotActiveException.html#_top_">NotActiveException</a>
    <dd> if the stream is not currently reading
              objects.
  </dl></dd>
</dl>
<a name="registerValidation(java.io.ObjectInputValidation, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="registerValidation"><b>registerValidation</b></a>
<pre>
 public synchronized void registerValidation(<a href="java.io.ObjectInputValidation.html#_top_">ObjectInputValidation</a> obj,
                                             int prio) throws <a href="java.io.NotActiveException.html#_top_">NotActiveException</a>, <a href="java.io.InvalidObjectException.html#_top_">InvalidObjectException</a>
</pre>
<dl>
  <dd> Register an object to be validated before the graph is
 returned.  While similar to resolveObject these validations are
 called after the entire graph has been reconstituted.
 Typically, a readObject method will register the object with
 the stream so that when all of the objects are restored a final
 set of validations can be performed.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - the object to receive the validation callback.
    <dd> prio - controls the order of callbacks;zero is a good default.
 Use higher numbers to be called back earlier, lower numbers for later
 callbacks. Within a priority, callbacks are processed in no
 particular order.
    <dt> <b>Throws:</b> <a href="java.io.NotActiveException.html#_top_">NotActiveException</a>
    <dd> The stream is not currently reading objects
 so it is invalid to register a callback.
    <dt> <b>Throws:</b> <a href="java.io.InvalidObjectException.html#_top_">InvalidObjectException</a>
    <dd> The validation object is null.
  </dl></dd>
</dl>
<a name="resolveClass(java.io.ObjectStreamClass)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="resolveClass"><b>resolveClass</b></a>
<pre>
 protected <a href="java.lang.Class.html#_top_">Class</a> resolveClass(<a href="java.io.ObjectStreamClass.html#_top_">ObjectStreamClass</a> v) throws <a href="java.io.IOException.html#_top_">IOException</a>, <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>
</pre>
<dl>
  <dd> Subclasses may implement this method to allow classes to be
 fetched from an alternate source. 
 The corresponding method in ObjectOutputStream is
 annotateClass.  This method will be invoked only once for each
 unique class in the stream.  This method can be implemented by
 subclasses to use an alternate loading mechanism but must
 return a Class object.  Once returned, the serialVersionUID of the
 class is compared to the serialVersionUID of the serialized class.
 If there is a mismatch, the deserialization fails and an exception
 is raised. <p>
 By default the class name is resolved relative to the class
 that called readObject. <p>
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.lang.ClassNotFoundException.html#_top_">ClassNotFoundException</a>
    <dd> If class of
 a serialized object cannot be found.
  </dl></dd>
</dl>
<a name="resolveObject(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="resolveObject"><b>resolveObject</b></a>
<pre>
 protected <a href="java.lang.Object.html#_top_">Object</a> resolveObject(<a href="java.lang.Object.html#_top_">Object</a> obj) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> This method will allow trusted subclasses of ObjectInputStream
 to substitute one object for another during
 deserialization. Replacing objects is disabled until
 enableResolveObject is called. The enableResolveObject method
 checks that the stream requesting to resolve object can be
 trusted. Every reference to serializable objects is passed to
 resolveObject.  To insure that the private state of objects is
 not unintentionally exposed only trusted streams may use
 resolveObject. <p>
 This method is called after an object has been read but before it is
 returned from readObject.  The default resolveObject method
 just returns the new object. <p>
 When a subclass is replacing objects it must insure that the
 substituted object is compatible with every field where the
 reference will be stored.  Objects whose type is not a subclass
 of the type of the field or array element abort the
 serialization by raising an exception and the object is not be
 stored. <p>
 This method is called only once when each object is first encountered.
 All subsequent references to the object will be redirected to the
 new object. <P>
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> Any of the usual Input/Output exceptions.
  </dl></dd>
</dl>
<a name="enableResolveObject(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="enableResolveObject"><b>enableResolveObject</b></a>
<pre>
 protected final boolean enableResolveObject(boolean enable) throws <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
</pre>
<dl>
  <dd> Enable the stream to allow objects read from the stream to be replaced.
 If the stream is a trusted class it is allowed to enable replacment.
 Trusted classes are those classes with a classLoader equals null. <p>
 When enabled the resolveObject method is called for every object
 being deserialized.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> The classloader of this stream object is non-null.
  </dl></dd>
</dl>
<a name="readStreamHeader()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readStreamHeader"><b>readStreamHeader</b></a>
<pre>
 protected void readStreamHeader() throws <a href="java.io.IOException.html#_top_">IOException</a>, <a href="java.io.StreamCorruptedException.html#_top_">StreamCorruptedException</a>
</pre>
<dl>
  <dd> The readStreamHeader method is provided to allow subclasses to
 read and verify their own stream headers. It reads and
 verifies the magic number and version number.
<p>
</dl>
<a name="read()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a byte of data. This method will block if no input is 
 available.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the byte read, or -1 if the end of the
		stream is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error has occurred.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#read()">read</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="read(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(byte data[],
                 int offset,
                 int length) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads into an array of bytes.  This method will
 block until some input is available.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read
    <dd> off - the start offset of the data
    <dd> len - the maximum number of bytes read
    <dt> <b>Returns:</b>
    <dd> the actual number of bytes read, -1 is
 		returned when the end of the stream is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error has occurred.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#read(byte[], int, int)">read</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="available()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="available"><b>available</b></a>
<pre>
 public int available() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the number of bytes that can be read without blocking.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number of available bytes.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#available()">available</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Closes the input stream. Must be called
 to release any resources associated with
 the stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error has occurred.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#close()">close</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="readBoolean()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readBoolean"><b>readBoolean</b></a>
<pre>
 public boolean readBoolean() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads in a boolean.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the boolean read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readByte()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readByte"><b>readByte</b></a>
<pre>
 public byte readByte() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads an 8 bit byte.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 8 bit byte read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readUnsignedByte()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUnsignedByte"><b>readUnsignedByte</b></a>
<pre>
 public int readUnsignedByte() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads an unsigned 8 bit byte.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 8 bit byte read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readShort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readShort"><b>readShort</b></a>
<pre>
 public short readShort() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 16 bit short.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 16 bit short read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readUnsignedShort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUnsignedShort"><b>readUnsignedShort</b></a>
<pre>
 public int readUnsignedShort() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads an unsigned 16 bit short.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 16 bit short read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readChar()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readChar"><b>readChar</b></a>
<pre>
 public char readChar() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 16 bit char.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 16 bit char read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readInt()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readInt"><b>readInt</b></a>
<pre>
 public int readInt() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 32 bit int.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 32 bit integer read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readLong()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readLong"><b>readLong</b></a>
<pre>
 public long readLong() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 64 bit long.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the read 64 bit long.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readFloat()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFloat"><b>readFloat</b></a>
<pre>
 public float readFloat() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 32 bit float.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 32 bit float read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readDouble()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readDouble"><b>readDouble</b></a>
<pre>
 public double readDouble() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a 64 bit double.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the 64 bit double read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readFully(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFully"><b>readFully</b></a>
<pre>
 public void readFully(byte data[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads bytes, blocking until all bytes are read.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readFully(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFully"><b>readFully</b></a>
<pre>
 public void readFully(byte data[],
                       int offset,
                       int size) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads bytes, blocking until all bytes are read.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read
    <dd> off - the start offset of the data
    <dd> len - the maximum number of bytes to read
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="skipBytes(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="skipBytes"><b>skipBytes</b></a>
<pre>
 public int skipBytes(int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Skips bytes, block until all bytes are skipped.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - the number of bytes to be skipped
    <dt> <b>Returns:</b>
    <dd> the actual number of bytes skipped.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> If end of file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If other I/O error has occurred.
  </dl></dd>
</dl>
<a name="readLine()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readLine"><b>readLine</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> readLine() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads in a line that has been terminated by a \n, \r, 
 \r\n or EOF.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a String copy of the line.
  </dl></dd>
</dl>
<a name="readUTF()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUTF"><b>readUTF</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> readUTF() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a UTF format String.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the String.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.LineNumberReader.html#_top_">Previous</a>  <a href="java.io.ObjectOutputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
