ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec StreamPumper.java
Date Sat, 22 Dec 2001 13:00:57 GMT
donaldp     01/12/22 05:00:57

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec
                        StreamPumper.java
  Log:
  Cleaned up file a bit and made it package access.
  
  Revision  Changes    Path
  1.2       +10 -8     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/StreamPumper.java
  
  Index: StreamPumper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/StreamPumper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StreamPumper.java	2001/12/17 09:49:30	1.1
  +++ StreamPumper.java	2001/12/22 13:00:57	1.2
  @@ -16,7 +16,8 @@
    *
    * @author thomas.haas@softwired-inc.com
    */
  -public class StreamPumper implements Runnable
  +class StreamPumper
  +    implements Runnable
   {
   
       // TODO: make SIZE and SLEEP instance variables.
  @@ -24,8 +25,8 @@
   
       private final static int SLEEP = 5;
       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.
  @@ -33,10 +34,11 @@
        * @param is input stream to read data from
        * @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 @@
           int length;
           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
                   {
                       Thread.sleep( SLEEP );
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message