class HttpRequestParser {
    private final DefaultFullHttpRequest _request;

    protected final Map<String, List<String>> parmMap = new HashMap<>();
    protected final Map<String, List<UploadedFile>> fileMap = new HashMap<>();

    public HttpRequestParser(DefaultFullHttpRequest req) {
        _request = req;
    }

    protected HttpRequestParser parse() throws Exception {<FILL_FUNCTION_BODY>}
}

        HttpMethod method = _request.method();

        // url 参数
        if (_request.uri().indexOf("?") > 0) {
            QueryStringDecoder decoder = new QueryStringDecoder(_request.uri());

            decoder.parameters().entrySet().forEach(entry -> {
                parmMap.put(entry.getKey(), entry.getValue());
            });
        }


        // body
        if (HttpMethod.POST == method
                || HttpMethod.PUT == method
                || HttpMethod.DELETE == method
                || HttpMethod.PATCH == method) {

            HttpPostRequestDecoder decoder = new HttpPostRequestDecoder(_request);
            decoder.offer(_request);

            List<InterfaceHttpData> parmList = decoder.getBodyHttpDatas();

            for (InterfaceHttpData p1 : parmList) {
                if (p1.getHttpDataType() == InterfaceHttpData.HttpDataType.Attribute) {
                    //参数
                    //
                    Attribute a1 = (Attribute) p1;

                    List<String> tmp = parmMap.get(a1.getName());
                    if (tmp == null) {
                        tmp = new ArrayList<>();
                        parmMap.put(a1.getName(), tmp);
                    }

                    tmp.add(a1.getValue());
                    continue;
                }

                if (p1.getHttpDataType() == InterfaceHttpData.HttpDataType.FileUpload) {
                    //文件
                    //
                    FileUpload f0 = (FileUpload) p1;

                    List<UploadedFile> tmp = fileMap.get(p1.getName());
                    if (tmp == null) {
                        tmp = new ArrayList<>();
                        fileMap.put(p1.getName(), tmp);
                    }


                    String contentType = f0.getContentType();
                    InputStream content = new FileInputStream(f0.getFile());
                    int contentSize = content.available();
                    String name = f0.getFilename();
                    String extension = null;
                    int idx = name.lastIndexOf(".");
                    if (idx > 0) {
                        extension = name.substring(idx + 1);
                    }

                    UploadedFile f1 = new UploadedFile(f0::delete, contentType, contentSize, content, name, extension);

                    tmp.add(f1);
                }
            }
        }

        return this;
    
<no_super_class>