public PrintStream createStatusPrintStream ( ) { return new PrintStream ( new OutputStream ( ) { StringBuffer sb = new StringBuffer ( ) ; @ Override public void write ( int b ) throws IOException { if ( b == ' ' ) { String str = sb . toString ( ) ; sb . delete ( 0 , sb . length ( ) ) ; writeLine ( str ) ; } else { sb . append ( Character . toString ( ( char ) b ) ) ; } } } ) ; }
Returns a new PrinstStream that can be used to update the status - text - area on this page .