private void readData()
    throws IOException
  {
    while (! isClosed) {
      int code = is.read();

      switch (code) {
      case ' ':
      case '\t':
      case '\n':
      case '\r':
        break;

      case 'C': {
        int channel = (is.read() << 8) + is.read();

        inputReady[channel] = true;
        return;
      }

      case 'E': {
        int channel = (is.read() << 8) + is.read();
        int status = (is.read() << 8) + is.read();

        inputReady[channel] = true;

        return;
      }

      case -1:
        close();
        return;
        
      default:
        // An error in the protocol.  Kill the connection.
        close();
        return;
      }
    }

    return;
  }