public Parameters(String requestStr) {
        int firstLine = requestStr.indexOf("\r");
        int spaceIdx = requestStr.indexOf(" ");
        int httpIdx = requestStr.indexOf("HTTP/1.");
        int queryIdx = requestStr.indexOf("?");
        if(firstLine != -1) {
            if(spaceIdx != -1 && spaceIdx <= firstLine)
                method = requestStr.substring(0, spaceIdx).trim();
            if(queryIdx != -1 && queryIdx < httpIdx) {
                path = requestStr.substring(spaceIdx, queryIdx).trim();
            } else {
                path = requestStr.substring(spaceIdx, httpIdx).trim();
            }
            try {
                path =  URLDecoder.decode(path, "UTF-8");
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
            int suffixIdx = path.lastIndexOf(".");
            if (suffixIdx != -1) {
                suffix = path.substring(suffixIdx, path.length());
            }
        }
    }