01: package vicazh.hyperpool.stream;
02:
03: import java.io.*;
04: import java.util.logging.*;
05: import vicazh.hyperpool.Start;
06:
07: class SpeedClientStream extends Stream {
08:
09: SpeedClientStream(Connection connection, OutputStream outputstream) {
10: super (connection, outputstream);
11: }
12:
13: public void write(int b) throws IOException {
14: try {
15: if (((SpeedConnection) connection).isReverse)
16: ((SpeedService) connection.element).serverwrite();
17: else
18: ((SpeedService) connection.element).clientwrite();
19: } catch (Exception e) {
20: Start.logger.log(Level.SEVERE, e.getMessage(), e);
21: }
22: super.write(b);
23: }
24: }
|