public class HttpClientManager extends Object
| Constructor and Description |
|---|
HttpClientManager() |
| Modifier and Type | Method and Description |
|---|---|
static long |
appendUrlContentsToFile(HTTPSession session,
String urlencoded,
File file,
long start,
long end)
Deprecated.
|
static long |
appendUrlContentsToFile(String urlencoded,
File file,
long start,
long end) |
static void |
clearState() |
static void |
copyUrlContentsToFile(HTTPSession session,
String urlencoded,
File file)
Deprecated.
|
static void |
copyUrlContentsToFile(String urlencoded,
File file) |
static String |
getContentAsString(HTTPSession session,
String urlencoded)
Deprecated.
|
static String |
getContentAsString(String urlencoded)
Get the content from a url.
|
static String |
getUrlContentsAsString(HTTPSession session,
String urlencoded,
int maxKbytes)
Deprecated.
|
static String |
getUrlContentsAsString(String urlencoded,
int maxKbytes) |
static void |
init(org.apache.commons.httpclient.auth.CredentialsProvider provider,
String userAgent)
initialize the HttpClient layer.
|
static int |
putContent(String urlencoded,
String content)
Put content to a url, using HTTP PUT.
|
static void |
showHttpRequestInfo(Formatter f,
org.apache.commons.httpclient.HttpMethodBase m) |
static void |
showHttpResponseInfo(Formatter f,
org.apache.commons.httpclient.HttpMethodBase m) |
public static void init(org.apache.commons.httpclient.auth.CredentialsProvider provider,
String userAgent)
provider - CredentialsProvider.userAgent - Content of User-Agent header, may be nullpublic static void clearState()
public static String getContentAsString(String urlencoded) throws IOException
urlencoded - url as a StringIOException - on error@Deprecated public static String getContentAsString(HTTPSession session, String urlencoded) throws IOException
session - use this session, if null, create a new oneurlencoded - url as a StringIOException - on errorpublic static int putContent(String urlencoded, String content) throws IOException
urlencoded - url as a Stringcontent - PUT this content at the given url.IOException - on errorpublic static String getUrlContentsAsString(String urlencoded, int maxKbytes)
@Deprecated public static String getUrlContentsAsString(HTTPSession session, String urlencoded, int maxKbytes)
public static void copyUrlContentsToFile(String urlencoded, File file) throws HTTPException
HTTPException@Deprecated public static void copyUrlContentsToFile(HTTPSession session, String urlencoded, File file) throws HTTPException
HTTPExceptionpublic static long appendUrlContentsToFile(String urlencoded, File file, long start, long end) throws HTTPException
HTTPException@Deprecated public static long appendUrlContentsToFile(HTTPSession session, String urlencoded, File file, long start, long end) throws HTTPException
HTTPExceptionpublic static void showHttpRequestInfo(Formatter f, org.apache.commons.httpclient.HttpMethodBase m)
public static void showHttpResponseInfo(Formatter f, org.apache.commons.httpclient.HttpMethodBase m)
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.