예제 #1
0
 @Override
 public W writeln(String s) {
   byte[] bytes = s.getBytes();
   conn.write(bytes);
   conn.write(CR_LF);
   return wrote(bytes.length + 2);
 }
예제 #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);
 }
예제 #3
0
 @Override
 public W write(ByteBuffer buf) {
   int n = buf.remaining();
   conn.write(buf);
   return wrote(n);
 }
예제 #4
0
 @Override
 public W write(byte[] bytes, int offset, int length) {
   conn.write(bytes, offset, length);
   return wrote(length);
 }
예제 #5
0
 @Override
 public W write(byte[] bytes) {
   conn.write(bytes);
   return wrote(bytes.length);
 }