int start = cd.indexOf("filename=\""); int end = cd.indexOf('"', start + 10); if (start != -1 && end != -1)
ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true);  Map params = parser.parse(cd, ';'); if (params.containsKey("filename"))
    protected String getFileName(Map /* String, String */ headers)    {        String fileName = null;        String cd = getHeader(headers, CONTENT_DISPOSITION);        if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT))        {            int start = cd.indexOf("filename=\"");            int end = cd.indexOf('"', start + 10);            if (start != -1 && end != -1)            {                fileName = cd.substring(start + 10, end).trim();            }        }        return fileName;    }