public void run()

in gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/StreamPumper.java [96:130]


    public void run() {
        synchronized (this) {
            started = true;
        }
        finished = false;
        finish = false;

        final byte[] buf = new byte[bufferSize];

        int length;
        try {
            while ((length = in.read(buf)) > 0 && !finish) {
                out.write(buf, 0, length);
                if (autoflush) {
                    out.flush();
                }
            }
            out.flush();
        }
        catch (Exception e) {
            synchronized (this) {
                exception = e;
            }
        }
        finally {
            if (closeWhenExhausted) {
                Closer.close(out);
            }
            finished = true;

            synchronized (this) {
                notifyAll();
            }
        }
    }