Java ContentDisposition からファイル名を抜き出す
ナビゲーションに移動
検索に移動
Java ContentDisposition からファイル名を抜き出す
Java |
- Pattern ptn = Pattern.compile(".*filename\\s*=\\s*[\"]{0,1}([^\"]+)[\"]{0,1}.*")
- Matcher matcher = ptn.matcher(contentDisposition);
- if (matcher.matches()) {
- filename = matcher.group(1);
- }
© 2006 矢木浩人