Search in sources :

Example 1 with FlushProofOutputStream

use of hudson.util.FlushProofOutputStream in project hudson-2.x by hudson.

the class Run method doConsoleText.

/**
     * Sends out the raw console output.
     */
public void doConsoleText(StaplerRequest req, StaplerResponse rsp) throws IOException {
    rsp.setContentType("text/plain;charset=UTF-8");
    // Prevent jelly from flushing stream so Content-Length header can be added afterwards
    FlushProofOutputStream out = new FlushProofOutputStream(rsp.getCompressedOutputStream(req));
    getLogText().writeLogTo(0, out);
    out.close();
}
Also used : FlushProofOutputStream(hudson.util.FlushProofOutputStream)

Aggregations

FlushProofOutputStream (hudson.util.FlushProofOutputStream)1