@Override public W writeln(String s) { byte[] bytes = s.getBytes(); conn.write(bytes); conn.write(CR_LF); return wrote(bytes.length + 2); }
@Override public W write(File file) { long size = file.length(); U.must(size < Integer.MAX_VALUE); conn.write(file); return wrote((int) size); }
@Override public W write(ByteBuffer buf) { int n = buf.remaining(); conn.write(buf); return wrote(n); }
@Override public W write(byte[] bytes, int offset, int length) { conn.write(bytes, offset, length); return wrote(length); }
@Override public W write(byte[] bytes) { conn.write(bytes); return wrote(bytes.length); }