Code example for SessionOutputBuffer

Methods: write

0
        if (this.total < this.contentLength) {
            final long max = this.contentLength - this.total;
            int chunk = len;
            if (chunk > max) {
                chunk = (int) max;
            } 
            this.out.write(b, off, chunk);
            this.total += chunk;
        } 
    } 
 
    @Override 
    public void write(final byte[] b) throws IOException {
        write(b, 0, b.length);
    } 
 
    @Override 
    public void write(final int b) throws IOException {
        if (this.closed) {
            throw new IOException("Attempted write to closed stream.");
Experience pair programming with AI  Get Codota for Java