com.izforge.izpack.installer
Class CompileWorker.EclipseStdOutHandler

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by com.izforge.izpack.installer.CompileWorker.EclipseStdOutHandler
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Enclosing class:
CompileWorker

private static class CompileWorker.EclipseStdOutHandler
extends java.io.PrintStream

This PrintStream is used to track the Eclipse compiler output.

It will pass on all println requests and report progress to the listener.


Field Summary
private  CompileHandler listener
           
private  CompileWorker.StdOutParser parser
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
CompileWorker.EclipseStdOutHandler(java.io.OutputStream anOutputStream, CompileHandler aHandler)
          Default constructor.
 
Method Summary
 void println(java.lang.String x)
          Eclipse compiler hopefully only uses println(String).
 void write(byte[] buf, int off, int len)
          Unfortunately, the Eclipse compiler wraps System.out into a BufferedWriter.
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

private CompileHandler listener

parser

private CompileWorker.StdOutParser parser
Constructor Detail

CompileWorker.EclipseStdOutHandler

public CompileWorker.EclipseStdOutHandler(java.io.OutputStream anOutputStream,
                                          CompileHandler aHandler)
Default constructor.

Parameters:
anOutputStream - The stream to wrap.
aHandler - the handler to use.
Method Detail

println

public void println(java.lang.String x)
Eclipse compiler hopefully only uses println(String).

Overrides:
println in class java.io.PrintStream

write

public void write(byte[] buf,
                  int off,
                  int len)
Unfortunately, the Eclipse compiler wraps System.out into a BufferedWriter.

So we get whole buffers here and cannot do anything about it.

Overrides:
write in class java.io.PrintStream