1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.conient; |
2 |
> |
package uk.org.iscream.conient; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
|
import java.io.*; |
6 |
< |
import uk.ac.ukc.iscream.util.*; |
6 |
> |
import uk.org.iscream.util.*; |
7 |
|
|
8 |
|
/** |
9 |
|
* The class reads in data from a BufferedReader, |
55 |
|
// continue until we are told to stop |
56 |
|
while (_running) { |
57 |
|
line = _inBound.readLine(); |
58 |
+ |
if (line == null) { |
59 |
+ |
throw new IOException("unexpected loss of connection to server"); |
60 |
+ |
} |
61 |
|
_dataQueue.add(line); |
62 |
|
} |
63 |
|
|
65 |
|
_inBound.close(); |
66 |
|
|
67 |
|
} catch (IOException e) { |
68 |
< |
SwingClient.addMessage("Data Channel Shutdown: reason - "+e); |
68 |
> |
Conient.addMessage("WARNING{data reader}: inbound data stopped - "+e); |
69 |
|
_running = false; |
70 |
|
} |
71 |
|
} |