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