com.uwyn.rife.tools
Class HttpUtils
java.lang.Object
com.uwyn.rife.tools.HttpUtils
public abstract class HttpUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHARSET
public static final String CHARSET
- See Also:
- Constant Field Values
CHARSET_PATTERN
public static final Pattern CHARSET_PATTERN
HttpUtils
public HttpUtils()
extractMimeTypeFromContentType
public static String extractMimeTypeFromContentType(String contentType)
- Extracts only the mime-type from a Content-Type HTTP header. Thus a header
like this:
text/html;charset=UTF-8 will return: text/html
- Parameters:
contentType - the Content-Type header
- Returns:
- the content type header without the charset
- Since:
- 1.6
getConnectionContent
public static String getConnectionContent(HttpURLConnection connection)
throws IOException
- Throws:
IOException
getConnectionContent
public static boolean getConnectionContent(HttpURLConnection connection,
OutputStream output)
throws IOException
- Throws:
IOException
retrievePage
public static HttpUtils.Page retrievePage(String absoluteUrl)
throws IOException
- Throws:
IOException
retrievePage
public static HttpUtils.Page retrievePage(String absoluteUrl,
boolean downloadContent)
throws IOException
- Throws:
IOException
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.