raphael 2003/12/01 14:53:29
Modified: commons/src/java/org/apache/jetspeed/util Tag:
aggregation_1-branch
ByteArrayServletOutputStream.java
Log:
- fix basic sequential aggregation
- enable debug testing
- first take on tackling parallel rendering issues
Revision Changes Path
No revision
No revision
1.1.2.2 +30 -0
jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util/Attic/ByteArrayServletOutputStream.java
Index: ByteArrayServletOutputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util/Attic/ByteArrayServletOutputStream.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ByteArrayServletOutputStream.java 30 Nov 2003 15:28:15 -0000 1.1.2.1
+++ ByteArrayServletOutputStream.java 1 Dec 2003 22:53:29 -0000 1.1.2.2
@@ -53,9 +53,14 @@
*/
package org.apache.jetspeed.util;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class ByteArrayServletOutputStream extends javax.servlet.ServletOutputStream
{
+ /** Commons logging */
+ protected final static Log log =
LogFactory.getLog(ByteArrayServletOutputStream.class);
+
private java.io.ByteArrayOutputStream baos;
public ByteArrayServletOutputStream()
@@ -63,6 +68,16 @@
baos = new java.io.ByteArrayOutputStream();
}
+ public void write(byte[] b) throws java.io.IOException
+ {
+ baos.write(b);
+ }
+
+ public void write(byte[] b,int off, int len) throws java.io.IOException
+ {
+ baos.write(b, off, len);
+ }
+
public void write(int b) throws java.io.IOException
{
baos.write(b);
@@ -71,6 +86,21 @@
public byte[] toByteArray()
{
return baos.toByteArray();
+ }
+
+ public String toString(String enc) throws java.io.UnsupportedEncodingException
+ {
+ return baos.toString(enc);
+ }
+
+ public void writeTo(java.io.OutputStream out) throws java.io.IOException
+ {
+ baos.writeTo(out);
+ }
+
+ public void reset()
+ {
+ baos.reset();
}
public void close() throws java.io.IOException
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]