git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270315 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -16,7 +16,8 @@ import java.io.OutputStream; | |||||
| * | * | ||||
| * @author thomas.haas@softwired-inc.com | * @author thomas.haas@softwired-inc.com | ||||
| */ | */ | ||||
| public class StreamPumper implements Runnable | |||||
| class StreamPumper | |||||
| implements Runnable | |||||
| { | { | ||||
| // TODO: make SIZE and SLEEP instance variables. | // TODO: make SIZE and SLEEP instance variables. | ||||
| @@ -24,8 +25,8 @@ public class StreamPumper implements Runnable | |||||
| private final static int SLEEP = 5; | private final static int SLEEP = 5; | ||||
| private final static int SIZE = 128; | private final static int SIZE = 128; | ||||
| private InputStream is; | |||||
| private OutputStream os; | |||||
| private InputStream m_input; | |||||
| private OutputStream m_output; | |||||
| /** | /** | ||||
| * Create a new stream pumper. | * Create a new stream pumper. | ||||
| @@ -33,10 +34,11 @@ public class StreamPumper implements Runnable | |||||
| * @param is input stream to read data from | * @param is input stream to read data from | ||||
| * @param os output stream to write data to. | * @param os output stream to write data to. | ||||
| */ | */ | ||||
| public StreamPumper( InputStream is, OutputStream os ) | |||||
| public StreamPumper( final InputStream input, | |||||
| final OutputStream output ) | |||||
| { | { | ||||
| this.is = is; | |||||
| this.os = os; | |||||
| m_input = input; | |||||
| m_output = output; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -50,9 +52,9 @@ public class StreamPumper implements Runnable | |||||
| int length; | int length; | ||||
| try | try | ||||
| { | { | ||||
| while( ( length = is.read( buf ) ) > 0 ) | |||||
| while( ( length = m_input.read( buf ) ) > 0 ) | |||||
| { | { | ||||
| os.write( buf, 0, length ); | |||||
| m_output.write( buf, 0, length ); | |||||
| try | try | ||||
| { | { | ||||
| Thread.sleep( SLEEP ); | Thread.sleep( SLEEP ); | ||||
| @@ -16,7 +16,8 @@ import java.io.OutputStream; | |||||
| * | * | ||||
| * @author thomas.haas@softwired-inc.com | * @author thomas.haas@softwired-inc.com | ||||
| */ | */ | ||||
| public class StreamPumper implements Runnable | |||||
| class StreamPumper | |||||
| implements Runnable | |||||
| { | { | ||||
| // TODO: make SIZE and SLEEP instance variables. | // TODO: make SIZE and SLEEP instance variables. | ||||
| @@ -24,8 +25,8 @@ public class StreamPumper implements Runnable | |||||
| private final static int SLEEP = 5; | private final static int SLEEP = 5; | ||||
| private final static int SIZE = 128; | private final static int SIZE = 128; | ||||
| private InputStream is; | |||||
| private OutputStream os; | |||||
| private InputStream m_input; | |||||
| private OutputStream m_output; | |||||
| /** | /** | ||||
| * Create a new stream pumper. | * Create a new stream pumper. | ||||
| @@ -33,10 +34,11 @@ public class StreamPumper implements Runnable | |||||
| * @param is input stream to read data from | * @param is input stream to read data from | ||||
| * @param os output stream to write data to. | * @param os output stream to write data to. | ||||
| */ | */ | ||||
| public StreamPumper( InputStream is, OutputStream os ) | |||||
| public StreamPumper( final InputStream input, | |||||
| final OutputStream output ) | |||||
| { | { | ||||
| this.is = is; | |||||
| this.os = os; | |||||
| m_input = input; | |||||
| m_output = output; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -50,9 +52,9 @@ public class StreamPumper implements Runnable | |||||
| int length; | int length; | ||||
| try | try | ||||
| { | { | ||||
| while( ( length = is.read( buf ) ) > 0 ) | |||||
| while( ( length = m_input.read( buf ) ) > 0 ) | |||||
| { | { | ||||
| os.write( buf, 0, length ); | |||||
| m_output.write( buf, 0, length ); | |||||
| try | try | ||||
| { | { | ||||
| Thread.sleep( SLEEP ); | Thread.sleep( SLEEP ); | ||||