jcurzez.io
Class JcurzezOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--jcurzez.io.JcurzezOutputStream

public class JcurzezOutputStream
extends java.io.OutputStream

This class is a hack to replace System.out (and System.err) so that all printed chars use Jcurzez.

Version:
0.0.4
Author:
Thomas Girard

Field Summary
private  Screen screen
          The screen where to send characters.
 
Constructor Summary
JcurzezOutputStream(Screen screen)
          Does actually nothing.
 
Method Summary
 void close()
          This method does nothing.
 void flush()
          Flushes the output stream, i.e. empty internal buffer.
 void write(int b)
          Write specified character at current position.
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

screen

private final Screen screen
The screen where to send characters.

Constructor Detail

JcurzezOutputStream

public JcurzezOutputStream(Screen screen)
Does actually nothing.

Method Detail

write

public void write(int b)
           throws java.io.IOException
Write specified character at current position.

Specified by:
write in class java.io.OutputStream
Parameters:
b - the character to write.
Throws:
java.io.IOException - if an error occurs while writing. It is currently unused.

flush

public void flush()
           throws java.io.IOException
Flushes the output stream, i.e. empty internal buffer. This method invokes AbstractWindow.refresh().

Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException - is never thrown.

close

public void close()
           throws java.io.IOException
This method does nothing.

Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - never thrown.


Send me an email