public void readParams() throws IOException {
            Set<String> allParams = paramsSet();

            // Read normal non-multipart params.
            for (String name : allParams) {
                if (!mParent.isParameterSet(name)) {
                    continue;
                }
                mParamTable.put(name, mParent.getParam(name).getBytes(IOUtil.UTF8));
                //System.err.println("Set Param: " + name + " : " + mParamTable.get(name));
            }

            // Then read multipart params if there are any.
            try {
                for (String part : mParent.getParts()) {
                    if (!allParams.contains(part)) {
                        continue;
                    }

                    // Special case file posts.
                    if (part.equals("upload")) {
                        HTTPUploadedFile uploadedFile = mParent.getUploadedFile(part);
                        Bucket bucket = uploadedFile.getData();
                        try {
                            byte[] data = IOUtil.readAndClose(bucket.getInputStream());
                            if (data == null) {
                                throw new IOException("Couldn't read uploaded file data from bucket.");
                            }
                            if (data.length > WikiApp.MAX_POST_LENGTH) {
                                throw new IOException("Uploaded file too big.");
                            }
                            mParamTable.put(part, data);
                            mParamTable.put(part + ".filename", uploadedFile.getFilename().getBytes(IOUtil.UTF8));
                        } finally {
                            bucket.free();
                        }
                    } else {
                        byte[] value = mParent.getPartAsBytesFailsafe(part, 128 * 1024);
                        mParamTable.put(part, value);
                    }
                    // Can fail if value isn't utf-8
                    // System.err.println("Set multipart Param: " + part + " : " +
                    //                    mParamTable.get(part));
                }

                if (!mParamTable.containsKey("action")) {
                    //System.err.println("Forced default action to view");
                    mParamTable.put("action", "view".getBytes(IOUtil.UTF8));
                }
                if (!mParamTable.containsKey("title")) {
                    mParamTable.put("title", mPath.getBytes(IOUtil.UTF8));
                }
            } finally {
                mParent.freeParts();
            }
        }