|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.vity.freerapid.plugins.webclient.utils.HttpUtils
public final class HttpUtils
Helpful utilities for parsing http headers
Method Summary | |
---|---|
static String |
getFileName(org.apache.commons.httpclient.HttpMethod method)
Extracts file name from response header Content-Disposition Eg for Content-Disposition: =? |
static String |
replaceInvalidCharsForFileSystem(String fileName,
String replaceString)
Replace invalid characters for file name on current file system with given one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getFileName(org.apache.commons.httpclient.HttpMethod method)
Content-Disposition: =?UTF-8?attachment;filename="Two Peaks Personal Vehicle Manager 2005 3.2.zip";?=
it returns Two Peaks Personal Vehicle Manager 2005 3.2.zip
method
- executed HttpMethod with Content-Disposition header
public static String replaceInvalidCharsForFileSystem(String fileName, String replaceString)
replaceInvalidCharsForFileSystem("diskFileName:", "_")
returns diskFileName_
on Windows file system
fileName
- given file namereplaceString
- usually a character that should be used for invalid characters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |