rwaldhoff 01/08/16 16:55:27
Modified: httpclient/src/java/org/apache/commons/httpclient/methods
Tag: rlwrefactoring PutMethod.java
Log:
renaming setData to setRequestBody, to mimic getResponseBody
Revision Changes Path
No revision
No revision
1.3.2.9 +13 -13
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.8
retrieving revision 1.3.2.9
diff -u -r1.3.2.8 -r1.3.2.9
--- PutMethod.java 2001/08/16 15:04:49 1.3.2.8
+++ PutMethod.java 2001/08/16 23:55:27 1.3.2.9
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
1.3.2.8 2001/08/16 15:04:49 rwaldhoff Exp $
- * $Revision: 1.3.2.8 $
- * $Date: 2001/08/16 15:04:49 $
+ * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
1.3.2.9 2001/08/16 23:55:27 rwaldhoff Exp $
+ * $Revision: 1.3.2.9 $
+ * $Date: 2001/08/16 23:55:27 $
*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
@@ -95,13 +95,13 @@
* @deprecated use {@link #setData} instead
*/
public void sendData(File file) throws IOException {
- setData(file);
+ setRequestBody(file);
}
/**
* Send the contents of a file.
*/
- public void setData(File file) throws IOException {
+ public void setRequestBody(File file) throws IOException {
checkNotUsed();
this.file = file;
}
@@ -111,13 +111,13 @@
* @deprecated use {@link #setData} instead
*/
public void sendData(URL url) throws IOException {
- sendData(url);
+ setRequestBody(url);
}
/**
* Send the contents of the resource at the specified URL.
*/
- public void setData(URL url) throws IOException {
+ public void setRequestBody(URL url) throws IOException {
checkNotUsed();
this.url = url;
}
@@ -128,13 +128,13 @@
* @deprecated use {@link #setData} instead
*/
public void sendData(byte[] data) {
- setData(data);
+ setRequestBody(data);
}
/**
* Send the contents of a byte array.
*/
- public void setData(byte[] data) {
+ public void setRequestBody(byte[] data) {
checkNotUsed();
this.data = data;
}
@@ -144,13 +144,13 @@
* @deprecated use {@link #setData} instead
*/
public void sendData(String data) {
- setData(data);
+ setRequestBody(data);
}
/**
* Send the contents of a string.
*/
- public void setData(String data) {
+ public void setRequestBody(String data) {
checkNotUsed();
sendData(data.getBytes());
}
@@ -162,7 +162,7 @@
* @deprecated use {@link #setData} instead
*/
public void sendData(InputStream is) throws IOException {
- setData(is);
+ setRequestBody(is);
}
/**
@@ -170,7 +170,7 @@
* memory. To upload large entities, it is recommended to first buffer the
* data into a temporary file, and then send that file.
*/
- public void setData(InputStream is) throws IOException {
+ public void setRequestBody(InputStream is) throws IOException {
checkNotUsed();
byte[] buffer = new byte[4096];
ByteArrayOutputStream os = new ByteArrayOutputStream();