All pastes #400208 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-18 15:51 UTC
rendered paste body
import java.io.*;

public class PushOutputThread extends Thread {
   
	OutputStreamWriter myopsw;
	InputStreamReader myipsr;
	boolean run=true;
	int n=0;
  
    public PushOutputThread(InputStream ips, OutputStream ops) {
        this.myopsw = new OutputStreamWriter(ops);
        this.myipsr = new InputStreamReader(ips);
    }
  
    public void run() {
    	try {
 	
    	while(run)
    	{
    		try {   n++;
    			myopsw.write(47);
    			if(n%5==0) System.out.println("n: "+n);
        		if(n==100000) run=false;
    		} catch (Exception e) {	}			
    	}
    }
}