/** * {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { checkState(); response.write(Buffer.buffer(b)); }
/** * {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { checkState(); response.write(Buffer.buffer(b)); }
/** * {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { checkState(); Buffer buffer = Buffer.buffer(); if (off == 0 && len == b.length) { buffer.appendBytes(b); } else { buffer.appendBytes(Arrays.copyOfRange(b, off, off + len)); } response.write(buffer); }
/** * {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { checkState(); Buffer buffer = new Buffer(); if (off == 0 && len == b.length) { buffer.appendBytes(b); } else { buffer.appendBytes(Arrays.copyOfRange(b, off, off + len)); } response.write(buffer); }
/** * {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { checkState(); Buffer buffer = Buffer.buffer(); if (off == 0 && len == b.length) { buffer.appendBytes(b); } else { buffer.appendBytes(Arrays.copyOfRange(b, off, off + len)); } response.write(buffer); }
/** * {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { checkState(); response.write(new Buffer(b)); }
/** * {@inheritDoc} */ @Override public void write(int b) throws IOException { checkState(); Buffer buffer = Buffer.buffer(); buffer.appendByte((byte) b); response.write(buffer); }
/** * {@inheritDoc} */ @Override public void write(int b) throws IOException { checkState(); Buffer buffer = new Buffer(); buffer.appendByte((byte) b); response.write(buffer); }
/** * {@inheritDoc} */ @Override public void write(int b) throws IOException { checkState(); Buffer buffer = Buffer.buffer(); buffer.appendByte((byte) b); response.write(buffer); }