org.apache.commons.httpclient.methods
Class UrlGetMethod
java.lang.Object
|
+--org.apache.commons.httpclient.HttpMethodBase
|
+--org.apache.commons.httpclient.methods.GetMethod
|
+--org.apache.commons.httpclient.methods.UrlGetMethod
- All Implemented Interfaces:
- HttpMethod, HttpUrlMethod
- public class UrlGetMethod
- extends GetMethod
- implements HttpUrlMethod
Implements the URL version of GetMethod. It serves the
same purpose as GetMethod but it takes URL instead of
a path.
- Author:
- Marc A. Saegesser
Constructor Summary |
UrlGetMethod()
No-arg constructor. |
UrlGetMethod(java.lang.String url)
|
UrlGetMethod(java.lang.String url,
java.io.File fileData)
Constructor. |
UrlGetMethod(java.lang.String url,
java.lang.String tempDir)
|
UrlGetMethod(java.lang.String url,
java.lang.String tempDir,
java.lang.String tempFile)
Constructor. |
Method Summary |
java.lang.String |
getUrl()
Returns this request's URL. |
void |
setUrl(java.lang.String url)
Sets the URL. |
Methods inherited from class org.apache.commons.httpclient.methods.GetMethod |
getFileData, getName, getResponseBody, getResponseBodyAsStream, getTempDir, getTempFile, getUseDisk, readResponseBody, recycle, setFileData, setTempDir, setTempFile, setUseDisk |
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase |
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getFollowRedirects, getPath, getQueryString, getRequestContentLength, getRequestHeader, getRequestHeaders, getResponseBodyAsString, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getStatusCode, getStatusText, hasBeenUsed, isHttp11, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, removeRequestHeader, setFollowRedirects, setHttp11, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, validate, writeRequest, writeRequestBody, writeRequestHeaders, writeRequestLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.httpclient.HttpMethod |
addRequestHeader, addRequestHeader, addResponseFooter, execute, getFollowRedirects, getName, getPath, getQueryString, getRequestHeader, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getStatusCode, getStatusText, hasBeenUsed, isStrictMode, recycle, removeRequestHeader, setFollowRedirects, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setStrictMode, validate |
UrlGetMethod
public UrlGetMethod()
- No-arg constructor.
UrlGetMethod
public UrlGetMethod(java.lang.String url)
throws java.net.MalformedURLException
UrlGetMethod
public UrlGetMethod(java.lang.String url,
java.lang.String tempDir)
throws java.net.MalformedURLException
UrlGetMethod
public UrlGetMethod(java.lang.String url,
java.lang.String tempDir,
java.lang.String tempFile)
throws java.net.MalformedURLException
- Constructor.
- Parameters:
url
- the path of the requesttempDir
- the directory in which to store temporary filestempFile
- the file (under tempDir) to buffer contents to- Throws:
java.net.MalformedURLException
-
UrlGetMethod
public UrlGetMethod(java.lang.String url,
java.io.File fileData)
throws java.net.MalformedURLException
- Constructor.
- Parameters:
url
- the path of the requestfileData
- the file to buffer contents to- Throws:
java.net.MalformedURLException
-
setUrl
public void setUrl(java.lang.String url)
throws java.net.MalformedURLException
- Sets the URL. Calls the underlying HttpMethod.setPath()
with the url's path. If the url contains a query string
the underlying HttpMethod.setQueryString() is called.
- Specified by:
setUrl
in interface HttpUrlMethod
- Parameters:
url
- - the URL for this request.
getUrl
public java.lang.String getUrl()
- Returns this request's URL.
- Specified by:
getUrl
in interface HttpUrlMethod
- Returns:
- the request's URL.
Copyright (c) 2001 - Apache Software Foundation