throw new Exception("Unknown RFB message type " + Integer.toString(msgType, 16));
throw new Exception("Unknown RFB message type " + msgType);
  public void processNormalProtocol() throws Exception {    zlibInflater = new Inflater();    tightInflaters = new Inflater[4];    // Show current time position in the control panel.    player.updatePos();    // Tell our FbsInputStream object to notify us when it goes to the    // `paused' mode.    rfb.fbs.addObserver(this);    // Main dispatch loop.    while (true) {      int msgType = rfb.readServerMessageType();      switch (msgType) {      case RfbProto.FramebufferUpdate:        rfb.readFramebufferUpdate();        for (int i = 0; i < rfb.updateNRects; i++) {          rfb.readFramebufferUpdateRectHdr();          boolean cursorPosReceived = false;          int rx = rfb.updateRectX, ry = rfb.updateRectY;          int rw = rfb.updateRectW, rh = rfb.updateRectH;          if (rfb.updateRectEncoding == rfb.EncodingLastRect)            break;          if (rfb.updateRectEncoding == rfb.EncodingNewFBSize) {            if (rfb.updateRectW != 0 && rfb.updateRectH != 0) {              rfb.setFramebufferSize(rfb.updateRectW, rfb.updateRectH);              updateFramebufferSize();            }            break;          }          if (rfb.updateRectEncoding == rfb.EncodingXCursor ||              rfb.updateRectEncoding == rfb.EncodingRichCursor) {            handleCursorShapeUpdate(rfb.updateRectEncoding, rx, ry, rw, rh);            continue;          }//	  if (rfb.updateRectEncoding == rfb.EncodingXCursor ||//	      rfb.updateRectEncoding == rfb.EncodingRichCursor) {//	    throw new Exception("Sorry, no support for" +//				" cursor shape updates yet");//	  }          if (rfb.updateRectEncoding == rfb.EncodingPointerPos) {            softCursorMove(rx, ry);            cursorPosReceived = true;            continue;          }          switch (rfb.updateRectEncoding) {          case RfbProto.EncodingRaw:            handleRawRect(rx, ry, rw, rh);            break;          case RfbProto.EncodingCopyRect:            handleCopyRect(rx, ry, rw, rh);            break;          case RfbProto.EncodingRRE:            handleRRERect(rx, ry, rw, rh);            break;          case RfbProto.EncodingCoRRE:            handleCoRRERect(rx, ry, rw, rh);            break;          case RfbProto.EncodingHextile:            handleHextileRect(rx, ry, rw, rh);            break;          case RfbProto.EncodingZlib:            handleZlibRect(rx, ry, rw, rh);            break;          case RfbProto.EncodingTight:            handleTightRect(rx, ry, rw, rh);            break;          default:            throw new Exception("Unknown RFB rectangle encoding " +                                Integer.toString(rfb.updateRectEncoding, 16));          }        }        break;      case RfbProto.SetColourMapEntries:        throw new Exception("Can't handle SetColourMapEntries message");      case RfbProto.Bell:        Toolkit.getDefaultToolkit().beep();        break;      case RfbProto.ServerCutText:        String s = rfb.readServerCutText();        break;      default:        throw new Exception("Unknown RFB message type " +                            Integer.toString(msgType, 16));      }      player.updatePos();    }  }