private void readFrameBufferUpdate() throws IOException {
            readPadding(1);
            int n = readCard16();
            // _console.writeline("reading " + n + " rectangles");
            for (int i = 0; i < n; ++i) {
                int x = readCard16();
                int y = readCard16();
                int width = readCard16();
                int height = readCard16();
                int encoding = readCard32();
                // _console.writeline("read " + x + " " + y + " " + width + " "
                // +
                // height + " " + encoding);
                switch (encoding) {
                case RAW_ENCODING:
                    readRawEncoding(x, y, width, height);
                    break;
                case RRE_ENCODING:
                    readRREEncoding(x, y, width, height);
                    break;
                case CORRE_ENCODING:
                    readCoRREEncoding(x, y, width, height);
                    break;
                case COPY_RECTANGLE_ENCODING:
                    readCopyRectangleEncoding(x, y, width, height);
                    break;
                case HEXTILE_ENCODING:
                    readHextileEncoding(x, y, width, height);
                    break;

                case CURSOR_PSEUDO_ENCODING:
                    readCursorPseudoEncoding(x, y, width, height);
                    break;

                case DESKTOP_SIZE_PSEUDO_ENCODING:
                    desktopSize(width, height);
                    break;

                default:
                    throw new VNCException("unimplemented encoding: "
                            + encoding);
                }
            }
            client_.clientFrameBufferUpdate();
        }