Author: richard.opalka(a)jboss.com
Date: 2008-09-26 07:18:17 -0400 (Fri, 26 Sep 2008)
New Revision: 8239
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/concurrent/CopyJob.java
Log:
[JBWS-2322] switch from PrintStream to OutputStream
Modified: common/trunk/src/main/java/org/jboss/wsf/common/concurrent/CopyJob.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/concurrent/CopyJob.java 2008-09-26
05:49:46 UTC (rev 8238)
+++ common/trunk/src/main/java/org/jboss/wsf/common/concurrent/CopyJob.java 2008-09-26
11:18:17 UTC (rev 8239)
@@ -23,7 +23,7 @@
import java.io.IOException;
import java.io.InputStream;
-import java.io.PrintStream;
+import java.io.OutputStream;
/**
* Sample usage:
@@ -54,7 +54,7 @@
/**
* Output stream to write data to.
*/
- private final PrintStream os;
+ private final OutputStream os;
/**
* Whether this job is terminated.
*/
@@ -65,7 +65,7 @@
* @param is input stream to read data from
* @param os output stream to write data to
*/
- public CopyJob( InputStream is, PrintStream os )
+ public CopyJob( InputStream is, OutputStream os )
{
super();
@@ -89,11 +89,11 @@
}
catch ( IOException ioe )
{
- ioe.printStackTrace( this.os );
+ ioe.printStackTrace(System.err);
}
finally
{
- try { this.is.close(); } catch ( IOException ioe ) { ioe.printStackTrace(
this.os ); }
+ try { this.is.close(); } catch ( IOException ioe ) { ioe.printStackTrace(
System.err ); }
}
}
@@ -103,7 +103,7 @@
* @param os output stream to write data to
* @throws IOException if I/O error occurs
*/
- private void copy( final InputStream is, final PrintStream os ) throws IOException
+ private void copy( final InputStream is, final OutputStream os ) throws IOException
{
final byte[] buffer = new byte[ 512 ];
int countOfBytes = -1;
@@ -121,7 +121,7 @@
}
catch ( InterruptedException ie )
{
- ie.printStackTrace( os );
+ ie.printStackTrace( System.err );
}
}
}
Show replies by date