Biblioteca Java - Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 mihai 1 /*
2  * FirScriitor.java
3  */
4 package lab.scd.fire.pipe_comm;
5  
6 import java.io.PipedOutputStream;
7  
8 /**
9  * Class created by @author Mihai HULEA at Feb 22, 2005.
10  *
11  * This class is part of the labs project.
12  *
13  */
14 class FirScriitor extends Thread
15 {
16         private PipedOutputStream po;
17         FirScriitor(){po = new PipedOutputStream();}
18  
19         public void run()
20         {
21                 try
22                 {
23                 while (true)
24                 {
25                     int d = (int)(10*Math.random());
26                     System.out.println("Fir scriitor trimite : "+d);
27                         po.write(d);
28                         sleep(400);
29                 }
30                 }catch(Exception e){}
31         }
32  
33         PipedOutputStream getPipe(){return po;}
34 }