org.apache.commons.httpclient.methods
Class HeadMethod

java.lang.Object
  |
  +--org.apache.commons.httpclient.HttpMethodBase
        |
        +--org.apache.commons.httpclient.methods.HeadMethod
All Implemented Interfaces:
HttpMethod
Direct Known Subclasses:
UrlHeadMethod

public class HeadMethod
extends HttpMethodBase

HEAD Method.

Since:
1.0
Author:
Remy Maucherat

Field Summary
 
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
USER_AGENT
 
Constructor Summary
HeadMethod()
          No-arg constructor.
HeadMethod(java.lang.String uri)
          Constructor specifying a URI.
 
Method Summary
 java.lang.String getName()
          Returns "HEAD".
protected  void readResponseBody(HttpState state, HttpConnection conn)
          Overrides HttpMethodBase method to not read a response body, despite the presence of a Content-Length or Transfer-Encoding header.
 void recycle()
          Override recycle to reset redirects default.
 
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getContentCharSet, getDoAuthentication, getFollowRedirects, getHostConfiguration, getPath, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestContentLength, getRequestHeader, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isHttp11, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, responseBodyConsumed, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, shouldCloseConnection, validate, writeRequest, writeRequestBody, writeRequestHeaders, writeRequestLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadMethod

public HeadMethod()
No-arg constructor.

Since:
1.0

HeadMethod

public HeadMethod(java.lang.String uri)
Constructor specifying a URI.

Parameters:
uri - either an absolute or relative URI
Since:
1.0
Method Detail

getName

public java.lang.String getName()
Returns "HEAD".

Specified by:
getName in interface HttpMethod
Specified by:
getName in class HttpMethodBase
Returns:
"HEAD"
Since:
2.0

recycle

public void recycle()
Override recycle to reset redirects default.

Specified by:
recycle in interface HttpMethod
Overrides:
recycle in class HttpMethodBase
Since:
1.0

readResponseBody

protected void readResponseBody(HttpState state,
                                HttpConnection conn)
                         throws java.io.IOException,
                                HttpException
Overrides HttpMethodBase method to not read a response body, despite the presence of a Content-Length or Transfer-Encoding header.

Overrides:
readResponseBody in class HttpMethodBase
Parameters:
state - shared http state
conn - the http connection to read from
Throws:
java.io.IOException - when there's an error reading data
HttpException - never FIXME
Since:
2.0
See Also:
HttpMethodBase.readResponse(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection), HttpMethodBase.processResponseBody(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection)


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.