예제 #1
0
  @Override
  public synchronized Channel write(File file) {
    try {
      FileInputStream stream = new FileInputStream(file);
      FileChannel fileChannel = stream.getChannel();
      output.append(fileChannel);
      stream.close();
    } catch (IOException e) {
      throw U.rte(e);
    }

    return this;
  }
예제 #2
0
 @Override
 public synchronized Channel write(byte[] bytes, int offset, int length) {
   output.append(bytes, offset, length);
   return this;
 }
예제 #3
0
 @Override
 public synchronized Channel write(ByteBuffer buf) {
   output.append(buf);
   return this;
 }
예제 #4
0
 @Override
 public synchronized Channel writeln(String s) {
   output.append(s);
   output.append(CR_LF);
   return this;
 }