step.io
Class StepSerialInput

java.lang.Object
  |
  +--step.io.StepSerialInput
All Implemented Interfaces:
StepRecordInput

public class StepSerialInput
extends Object
implements StepRecordInput

An intput stream that uses Java's serialization mechanism.

See Also:
StepRecord, StepSerialOutput

Constructor Summary
StepSerialInput(ObjectInput input)
          Create a STEP record input stream from a Java object input stream.
 
Method Summary
 void close()
          Close this input stream.
 StepRecord readRecord()
          Read the next STEP record from the object input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepSerialInput

public StepSerialInput(ObjectInput input)
Create a STEP record input stream from a Java object input stream.

Method Detail

readRecord

public StepRecord readRecord()
                      throws IOException,
                             ClassNotFoundException
Read the next STEP record from the object input stream.

Specified by:
readRecord in interface StepRecordInput
Returns:
the next (relevant) record from the input stream, or null if the end of input has been reached.
Throws:
ClassNotFoundException - if the class of a serialized object cannot be found.
IOException - if any of the usual I/O related exceptions occur.
ClassCastException - if the next object is not a STEP record.

close

public void close()
           throws IOException
Close this input stream.

Specified by:
close in interface StepRecordInput
IOException