code: protected void write(SocketChannel sc, String s) throws IOException {
          sc.write(encoder.encode(CharBuffer.wrap(s)));
      }
docs: Writes a command or command response to a socket channel.
  
  <p>This method is not safe for use by multiple concurrent threads.
  
  @param sc the socket channel
  @param s the command or command response