com.dalsemi.comm
Class NullInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--com.dalsemi.comm.NullInputStream

public class NullInputStream
extends java.io.InputStream

This class is used as a place holder when data is requested for input but a port is not currently avaliable. This class is used in the System class initially. We set stdin using this class so we don't have to worry about opening any devices


Constructor Summary
NullInputStream()
           
 
Method Summary
 int read()
          Reads the next byte of data from this input stream.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, hashCode, toString
 

Constructor Detail

NullInputStream

public NullInputStream()
Method Detail

read

public int read()
         throws java.io.IOException
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
Overrides:
read in class java.io.InputStream