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

public class HeadMethod
extends HttpMethodBase

HEAD Method.

Author:
Remy Maucherat

Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
USER_AGENT
 
Constructor Summary
HeadMethod()
          No-arg constructor.
HeadMethod(java.lang.String path)
          Path-setting constructor.
 
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()
          Recycle this method so that it can be used again.
 
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, followRedirects, generateRequestLine, getPath, getQueryString, getRequestContentLength, getRequestHeader, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseHeader, getResponseHeaders, getStatusCode, getStatusText, hasBeenUsed, isHttp11, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, removeRequestHeader, setFollowRedirects, setHttp11, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, 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.

HeadMethod

public HeadMethod(java.lang.String path)
Path-setting constructor.
Parameters:
path - the path to request
Method Detail

recycle

public void recycle()
Description copied from class: HttpMethodBase
Recycle this method so that it can be used again. All of my instances variables will be reset once this method has been called.
Overrides:
recycle in class HttpMethodBase

getName

public java.lang.String getName()
Returns "HEAD".
Overrides:
getName in class HttpMethodBase
Returns:
"HEAD"

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
Following copied from class: org.apache.commons.httpclient.HttpMethodBase
Parameters:
state - the client state
conn - the HttpConnection to read the response from
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 (c) 2001 - Apache Software Foundation