com.dalsemi.comm
Class NullOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--com.dalsemi.comm.NullOutputStream

public class NullOutputStream
extends java.io.OutputStream

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


Constructor Summary
NullOutputStream()
           
 
Method Summary
 void write(byte[] barr, int offset, int length)
          Writes the specified array to this output stream.
 void write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
equals, hashCode, toString
 

Constructor Detail

NullOutputStream

public NullOutputStream()
Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream.
Parameters:
b - data to be sent
Throws:
IOException -  
Overrides:
write in class java.io.OutputStream

write

public void write(byte[] barr,
                  int offset,
                  int length)
           throws java.io.IOException
Writes the specified array to this output stream. I included this so that the null write routines wouldn't get bogged down in the array accesses calling write.
Parameters:
barr - the array containing data to be output.
offset - offset into array where data starts.
length - number of bytes to be sent
Throws:
IOException -  
Overrides:
write in class java.io.OutputStream