rwaldhoff    01/08/23 14:35:31

  Modified:    httpclient/src/java/org/apache/commons/httpclient/methods
                        Tag: rlwrefactoring PutMethod.java
  Log:
  removing deprecated sendData methods, use setRequestBody instead
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.12  +10 -52    
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
  retrieving revision 1.3.2.11
  retrieving revision 1.3.2.12
  diff -u -r1.3.2.11 -r1.3.2.12
  --- PutMethod.java    2001/08/20 17:21:20     1.3.2.11
  +++ PutMethod.java    2001/08/23 21:35:31     1.3.2.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
 1.3.2.11 2001/08/20 17:21:20 rwaldhoff Exp $
  - * $Revision: 1.3.2.11 $
  - * $Date: 2001/08/20 17:21:20 $
  + * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
 1.3.2.12 2001/08/23 21:35:31 rwaldhoff Exp $
  + * $Revision: 1.3.2.12 $
  + * $Date: 2001/08/23 21:35:31 $
    *
    * Copyright (C) The Apache Software Foundation. All rights reserved.
    *
  @@ -91,82 +91,40 @@
       }
   
       /**
  -     * Send the contents of a file.
  -     * @deprecated use {@link #setRequestBody(java.io.File)} instead
  +     * Set my request body content to the contents of a file.
        */
  -    public void sendData(File file) throws IOException {
  -        setRequestBody(file);
  -    }
  -
  -    /**
  -     * Send the contents of a file.
  -     */
       public void setRequestBody(File file) throws IOException {
           checkNotUsed();
           this.file = file;
       }
   
       /**
  -     * Send the contents of the resource at the specified URL.
  -     * @deprecated use {@link #setRequestBody(java.net.URL)} instead
  +     * Set my request body content to the resource at the specified URL.
        */
  -    public void sendData(URL url) throws IOException {
  -        setRequestBody(url);
  -    }
  -
  -    /**
  -     * Send the contents of the resource at the specified URL.
  -     */
       public void setRequestBody(URL url) throws IOException {
           checkNotUsed();
           this.url = url;
       }
   
  -
       /**
  -     * Send the contents of a byte array.
  -     * @deprecated use {@link #setRequestBody(byte[])} instead
  +     * Set my request body content to the contents of a byte array.
        */
  -    public void sendData(byte[] data) {
  -        setRequestBody(data);
  -    }
  -
  -    /**
  -     * Send the contents of a byte array.
  -     */
       public void setRequestBody(byte[] data) {
           checkNotUsed();
           this.data = data;
       }
   
  -    /**
  -     * Send the contents of a string.
  -     * @deprecated use {@link #setRequestBody(java.lang.String)} instead
  -     */
  -    public void sendData(String data) {
  -        setRequestBody(data);
  -    }
  -
       /**
  -     * Send the contents of a string.
  +     * Set my request body content to the contents of a string.
        */
       public void setRequestBody(String data) {
           checkNotUsed();
  -        sendData(data.getBytes());
  -    }
  -
  -    /**
  -     * Send the contents of an input stream. The contents will be buffered into
  -     * memory. To upload large entities, it is recommended to first buffer the
  -     * data into a temporary file, and then send that file.
  -     * @deprecated use {@link #setRequestBody(java.io.InputStream)} instead
  -     */
  -    public void sendData(InputStream is) throws IOException {
  -        setRequestBody(is);
  +        setRequestBody(data.getBytes());
       }
   
       /**
  -     * Send the contents of an input stream. The contents will be buffered into
  +     * Set my request body content to the contents of an input stream.
  +     * The contents will be buffered into
        * memory. To upload large entities, it is recommended to first buffer the
        * data into a temporary file, and then send that file.
        */
  
  
  

Reply via email to