edu.neu.ccs.console
Class ConsoleGateway.ConsoleOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--edu.neu.ccs.console.ConsoleGateway.ConsoleOutputStream
Enclosing class:
ConsoleGateway

public class ConsoleGateway.ConsoleOutputStream
extends OutputStream

Inner class of ConsoleGateway, and derived class of OutputStream that provides output functionality for a console object.

Since:
1.0
See Also:
ConsoleGateway

Constructor Summary
ConsoleGateway.ConsoleOutputStream(int destination)
          Constructs a console output stream with the given destination.
 
Method Summary
 void close()
          Closes this output stream.
 void flush()
          Flushes this output stream.
 void write(byte[] b)
          Writes b.length bytes to this output stream.
 void write(byte[] b, int offset, int length)
          Writes length bytes from the given byte array to this output stream, starting at the specified offset.
 void write(int b)
          Writes the given byte to this output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleGateway.ConsoleOutputStream

public ConsoleGateway.ConsoleOutputStream(int destination)
Constructs a console output stream with the given destination.

Method Detail

close

public void close()
Closes this output stream. This implementation does nothing.

Overrides:
close in class OutputStream

flush

public void flush()
           throws IOException
Flushes this output stream.

Overrides:
flush in class OutputStream
IOException

write

public void write(byte[] b)
Writes b.length bytes to this output stream.

Overrides:
write in class OutputStream
Parameters:
b - the array of bytes to write

write

public void write(byte[] b,
                  int offset,
                  int length)
Writes length bytes from the given byte array to this output stream, starting at the specified offset.

Overrides:
write in class OutputStream
Parameters:
b - the array of bytes to write
offset - the desired offset
length - the number of bytes to write

write

public void write(int b)
Writes the given byte to this output stream.

Specified by:
write in class OutputStream
Parameters:
b - the byte to write