code: protected String read(SocketChannel sc) throws IOException {
          sc.read(buffer);
          buffer.flip();
  
          decoder.decode(buffer, charBuffer, true);
          charBuffer.flip();
  
          String result = charBuffer.toString();
  
          // Clear out buffers
          buffer.clear();
          charBuffer.clear();
          decoder.reset();
  
          return result;
      }
docs: Reads a command or command response from a socket channel.
  
  <p>This method is not safe for use by multiple concurrent threads.
  
  @param sc the socket channel
  @return the command or command response