[EMAIL PROTECTED] wrote:
int data;
             ByteArrayOutputStream out = new ByteArrayOutputStream();
-            while ((data = in.read()) > 0) {
+            while ((data = in.read()) != -1) {
                 out.write(data);
             }
             out.flush();

Using a small byte array to read a block of chars into it will make this perform much better.

Sanjiva.
--
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: [EMAIL PROTECTED]; cell: +1 650 265 8311 | +94 77 787 6880

"Oxygenating the Web Service Platform."

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to