View Javadoc

    1   /*
    2    * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v 1.26 2004/04/18 23:51:37 jsdever Exp $
    3    * $Revision: 480424 $
    4    * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $
    5    *
    6    * ====================================================================
    7    *
    8    *  Licensed to the Apache Software Foundation (ASF) under one or more
    9    *  contributor license agreements.  See the NOTICE file distributed with
    10   *  this work for additional information regarding copyright ownership.
    11   *  The ASF licenses this file to You under the Apache License, Version 2.0
    12   *  (the "License"); you may not use this file except in compliance with
    13   *  the License.  You may obtain a copy of the License at
    14   *
    15   *      http://www.apache.org/licenses/LICENSE-2.0
    16   *
    17   *  Unless required by applicable law or agreed to in writing, software
    18   *  distributed under the License is distributed on an "AS IS" BASIS,
    19   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    20   *  See the License for the specific language governing permissions and
    21   *  limitations under the License.
    22   * ====================================================================
    23   *
    24   * This software consists of voluntary contributions made by many
    25   * individuals on behalf of the Apache Software Foundation.  For more
    26   * information on the Apache Software Foundation, please see
    27   * <http://www.apache.org/>.
    28   *
    29   */
    30
    31  package org.apache.commons.httpclient.methods;
    32
    33  /**
    34   * Implements the HTTP PUT method.
    35   * <p>
    36   * The HTTP PUT method is defined in section 9.6 of
    37   * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
    38   * <blockquote>
    39   * The PUT method requests that the enclosed entity be stored under the
    40   * supplied Request-URI. If the Request-URI refers to an already
    41   * existing resource, the enclosed entity SHOULD be considered as a
    42   * modified version of the one residing on the origin server.
    43   * </blockquote>
    44   * </p>
    45   *
    46   * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
    47   * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    48   * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
    49   * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
    50   *
    51   * @version $Revision: 480424 $
    52   * @since 1.0
    53   */
    54  public class PutMethod extends EntityEnclosingMethod {
    55
    56      // ----------------------------------------------------------- Constructors
    57
    58      /**
    59       * No-arg constructor.
    60       *
    61       * @since 1.0
    62       */
    63      public PutMethod() {
    64          super();
    65      }
    66
    67
    68      /**
    69       * Constructor specifying a URI.
    70       *
    71       * @param uri either an absolute or relative URI
    72       *
    73       * @since 1.0
    74       */
    75      public PutMethod(String uri) {
    76          super(uri);
    77      }
    78
    79      // --------------------------------------------------------- Public Methods
    80
    81      /**
    82       * Return <tt>"PUT"</tt>.
    83       * @return <tt>"PUT"</tt>
    84       *
    85       * @since 2.0
    86       */
    87      public String getName() {
    88          return "PUT";
    89      }
    90  }