Code example for SessionOutputBuffer

Methods: flush

0
    public void close() throws IOException { 
        if (!this.closed) {
            this.closed = true;
            this.out.flush();
        } 
    } 
 
    @Override 
    public void flush() throws IOException { 
        this.out.flush();
    } 
 
    @Override 
    public void write(final byte[] b, final int off, final int len) throws IOException {
        if (this.closed) {
            throw new IOException("Attempted write to closed stream.");
        } 
        if (this.total < this.contentLength) {
            final long max = this.contentLength - this.total;
            int chunk = len;