Class OptionsMethod

java.lang.Object
org.apache.commons.httpclient.HttpMethodBase
All Implemented Interfaces:
org.apache.commons.httpclient.HttpMethod

public class OptionsMethod extends XMLResponseMethodBase
OPTIONS Method.
  • Field Details

  • Constructor Details

    • OptionsMethod

      public OptionsMethod()
      Method constructor.
    • OptionsMethod

      public OptionsMethod(String path)
      Method constructor.
    • OptionsMethod

      public OptionsMethod(String path, int type)
      Method constructor.
  • Method Details

    • isAllowed

      public boolean isAllowed(String method)
      Is the specified method allowed ?
    • getAllowedMethods

      public Enumeration getAllowedMethods()
      Get a list of allowed methods.
    • isSupported

      public boolean isSupported(String capability)
      Is DAV capability supported ?
    • getDavCapabilities

      public Enumeration getDavCapabilities()
      Get a list of supported DAV capabilities.
    • parseResponse

      public void parseResponse(InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws IOException, org.apache.commons.httpclient.HttpException
      Parse response.
      Overrides:
      parseResponse in class XMLResponseMethodBase
      Parameters:
      input - Input stream
      Throws:
      IOException
      org.apache.commons.httpclient.HttpException
    • processResponseHeaders

      public void processResponseHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)
      Process response headers. The contract of this method is that it only parses the response headers.
      Overrides:
      processResponseHeaders in class org.apache.commons.httpclient.HttpMethodBase
      Parameters:
      state - the state
      conn - the connection
    • generateRequestBody

      protected String generateRequestBody()
      DAV requests that contain a body must override this function to generate that body.

      The default behavior simply returns an empty body.

      Overrides:
      generateRequestBody in class XMLResponseMethodBase
    • getName

      public String getName()
      Specified by:
      getName in interface org.apache.commons.httpclient.HttpMethod
      Specified by:
      getName in class org.apache.commons.httpclient.HttpMethodBase
    • addRequestHeaders

      public void addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws IOException, org.apache.commons.httpclient.HttpException
      Overrides:
      addRequestHeaders in class org.apache.commons.httpclient.HttpMethodBase
      Throws:
      IOException
      org.apache.commons.httpclient.HttpException
    • getAllResponseURLs

      public Enumeration getAllResponseURLs()
      This method returns an enumeration of URL paths. If the PropFindMethod was sent to the URL of a collection, then there will be multiple URLs. The URLs are picked out of the <D:href> elements of the response.
      Returns:
      an enumeration of URL paths as Strings
    • getResponseProperties

      public Enumeration getResponseProperties()
    • parseResponseContent

      protected Document parseResponseContent(InputStream is) throws ParserConfigurationException, SAXException, IOException
      Throws:
      ParserConfigurationException
      SAXException
      IOException