hudson.console
Class PlainTextConsoleOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by hudson.console.LineTransformationOutputStream
          extended by hudson.console.PlainTextConsoleOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class PlainTextConsoleOutputStream
extends LineTransformationOutputStream

Filters out console notes.

Author:
Kohsuke Kawaguchi

Constructor Summary
PlainTextConsoleOutputStream(OutputStream out)
           
 
Method Summary
 void close()
           
protected  void eol(byte[] in, int sz)
          Called after we read the whole line of plain text.
 void flush()
           
 
Methods inherited from class hudson.console.LineTransformationOutputStream
forceEol, trimEOL, write, write
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextConsoleOutputStream

public PlainTextConsoleOutputStream(OutputStream out)
Method Detail

eol

protected void eol(byte[] in,
                   int sz)
            throws IOException
Called after we read the whole line of plain text.

Specified by:
eol in class LineTransformationOutputStream
Parameters:
in - Contents of the whole line, including the EOL code like CR/LF.
sz - Specifies the length of the valid contents in 'b'. The rest is garbage. This is so that the caller doesn't have to allocate an array of the exact size.
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class LineTransformationOutputStream
Throws:
IOException


Copyright © 2004-2013. All Rights Reserved.