[prev in list] [next in list] [prev in thread] [next in thread]
List: slide-dev
Subject: cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods PutMethod.java
From: juergen () apache ! org
Date: 2001-02-27 17:46:12
[Download RAW message or body]
juergen 01/02/27 09:46:12
Modified: src/webdav/client/src/org/apache/webdav/lib/methods
PutMethod.java
Log:
the content of the put method can be set via the setQuery too. In this case the \
content is returned via the query field.
Revision Changes Path
1.6 +18 -15 \
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PutMethod.java
Index: PutMethod.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PutMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PutMethod.java 2001/01/26 18:54:59 1.5
+++ PutMethod.java 2001/02/27 17:46:10 1.6
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PutMethod.java,v \
1.5 2001/01/26 18:54:59 remm Exp $
- * $Revision: 1.5 $
- * $Date: 2001/01/26 18:54:59 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PutMethod.java,v \
1.6 2001/02/27 17:46:10 juergen Exp $ + * $Revision: 1.6 $
+ * $Date: 2001/02/27 17:46:10 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -23,15 +23,15 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
+ * from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
@@ -59,7 +59,7 @@
*
* [Additional notices, if required by prior licensing conditions]
*
- */
+ */
package org.apache.webdav.lib.methods;
@@ -78,7 +78,7 @@
/**
* PUT Method.
- *
+ *
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
*/
public class PutMethod
@@ -172,7 +172,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 sendData(InputStream is)
+ public void sendData(InputStream is)
throws IOException {
checkNotUsed();
byte[] buffer = new byte[4096];
@@ -194,7 +194,7 @@
/**
* Is the query body submitted through an InputStream of with a String.
* If an InputStream is available, it's used.
- *
+ *
* @return boolean True if the content is avalable in an InputStream
*/
public boolean isStreamedQuery() {
@@ -216,10 +216,13 @@
/**
* Generate the query body.
- *
+ *
* @return String query
*/
public String generateQuery() {
+ if (query != null){
+ return query;
+ }
if (data == null) {
return "";
} else {
@@ -232,7 +235,7 @@
* Stream the body of the query. This function should be used to send large
* request bodies.
*/
- public void streamQuery(OutputStream out)
+ public void streamQuery(OutputStream out)
throws IOException {
InputStream inputStream = null;
@@ -258,7 +261,7 @@
/**
* Parse response.
- *
+ *
* @param is Input stream
*/
public void parseResponse(InputStream is)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic