Biblioteca Java - Blame information for rev 3
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
3 | mihai | 1 | /* |
2 | * FirCititor.java | ||
3 | */ | ||
4 | package lab.scd.fire.pipe_comm; | ||
5 | |||
6 | /** | ||
7 | * Class created by @author Mihai HULEA at Feb 22, 2005. | ||
8 | * | ||
9 | * This class is part of the labs project. | ||
10 | * | ||
11 | */ | ||
12 | import java.io.*; | ||
13 | |||
14 | class FirCititor extends Thread | ||
15 | { | ||
16 | private PipedInputStream pi; | ||
17 | FirCititor() | ||
18 | { | ||
19 | pi = new PipedInputStream(); | ||
20 | } | ||
21 | |||
22 | public void run() | ||
23 | { | ||
24 | try | ||
25 | { | ||
26 | while (true) | ||
27 | { | ||
28 | if (pi.available()>0) | ||
29 | {System.out.println("Fir cititor a primit : "+pi.read());} | ||
30 | } | ||
31 | }catch(Exception e){} | ||
32 | |||
33 | } | ||
34 | |||
35 | void conect(PipedOutputStream os)throws Exception | ||
36 | { | ||
37 | pi.connect(os); | ||
38 | } | ||
39 | } |