ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/DataReader.java
Revision: 1.5
Committed: Sat Jan 20 16:06:53 2001 UTC (23 years, 3 months ago) by ajm
Branch: MAIN
Changes since 1.4: +8 -13 lines
Log Message:
various updates, now displays a nice status
still far from complete

File Contents

# Content
1 //---PACKAGE DECLARATION---
2
3 //---IMPORTS---
4 import java.io.*;
5 import uk.ac.ukc.iscream.util.*;
6
7 /**
8 * Reads in bound data and presents it as it comes
9 * in for anything that wants it.
10 *
11 * @author $Author: ajm4 $
12 * @version $Id: DataReader.java,v 1.4 2001/01/15 03:15:06 ajm4 Exp $
13 */
14 public class DataReader extends Thread {
15
16 //---FINAL ATTRIBUTES---
17
18 /**
19 * The current CVS revision of this class
20 */
21 public final String REVISION = "$Revision: 1.4 $";
22
23 //---STATIC METHODS---
24
25 //---CONSTRUCTORS---
26
27 public DataReader(BufferedReader inBound, Queue dataQueue) {
28 _inBound = inBound;
29 _dataQueue = dataQueue;
30 }
31
32 //---PUBLIC METHODS---
33
34 public void run() {
35 boolean running = true;
36 try {
37 while (true) {
38 _dataQueue.add(_inBound.readLine());
39 }
40 } catch (IOException e) {
41 System.err.println("This DataReader thread has been shut down as an exception occured: "+e);
42 running = false;
43 return;
44 }
45 }
46
47 //---PRIVATE METHODS---
48
49 //---ACCESSOR/MUTATOR METHODS---
50
51 //---ATTRIBUTES---
52
53 BufferedReader _inBound;
54 Queue _dataQueue;
55
56 //---STATIC ATTRIBUTES---
57
58 }