dion 02/02/17 20:53:23 Modified: httpclient/src/java/org/apache/commons/httpclient RequestOutputStream.java Log: Applied patches from Sean C Sullivan, but removed one where NullPointerException was thrown where previously null was special cased. Revision Changes Path 1.9 +15 -9 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java Index: RequestOutputStream.java =================================================================== RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- RequestOutputStream.java 17 Feb 2002 12:15:56 -0000 1.8 +++ RequestOutputStream.java 18 Feb 2002 04:53:23 -0000 1.9 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java,v 1.8 2002/02/17 12:15:56 dion Exp $ - * $Revision: 1.8 $ - * $Date: 2002/02/17 12:15:56 $ + * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java,v 1.9 2002/02/18 04:53:23 dion Exp $ + * $Revision: 1.9 $ + * $Date: 2002/02/18 04:53:23 $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -76,7 +76,10 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a> * @author Sean C. Sullivan * @author <a href="mailto:[EMAIL PROTECTED]">dIon Gillard</a> - * @version $Revision: 1.8 $ $Date: 2002/02/17 12:15:56 $ + * @version $Revision: 1.9 $ $Date: 2002/02/18 04:53:23 $ + * + * @see ResponseInputStream + * */ public class RequestOutputStream extends OutputStream { @@ -87,7 +90,7 @@ * Construct an output stream wrapping the given stream. * The stream will not use chunking. * - * @param stream Wrapped input stream + * @param stream wrapped output stream. Must be non-null. */ public RequestOutputStream(OutputStream stream) { this(stream, false); @@ -96,7 +99,9 @@ /** * Construct an output stream wrapping the given stream. * - * @param stream Wrapped input stream + * @param stream wrapped output stream. Must be non-null. + * @param useChunking when <code>true</code>, the chunked transfer encoding + * will be used */ public RequestOutputStream(OutputStream stream, boolean useChunking) { if (stream == null) { @@ -185,12 +190,13 @@ * without a carriage return-line feed (CRLF) * character at the end. * - * @param s the <code>String</code to send to the client + * @param s the <code>String</code> to send to the client. Must be non-null. * @exception IOException if an input or output exception occurred */ public void print(String s) throws IOException { - if (s == null) - s = "null"; + if (s == null) { + s = "null"; + } int len = s.length(); for (int i = 0; i < len; i++) { write(s.charAt(i));
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>