01: package vicazh.hyperpool.stream.net.http.html;
02:
03: import java.io.*;
04: import vicazh.hyperpool.stream.net.http.*;
05:
06: class TaskSession extends Session {
07:
08: TaskSession(Connection connection) {
09: super (connection);
10: }
11:
12: public void setServer(OutputStream outputstream) {
13: setServer(new TaskStream(this ));
14: }
15:
16: public void setClient(OutputStream outputstream) {
17: setClient(new PathStream(this , outputstream));
18: }
19:
20: void src(String s) throws IOException {
21: ((Task) connection.element).add(((PathStream) getClient())
22: .getURL(s.replace(" ", "%20")),
23: ((TaskConnection) connection).level);
24: }
25:
26: void href(String s) throws IOException {
27: if (((TaskConnection) connection).level >= ((Task) connection.element)
28: .getLevel())
29: return;
30: String s2 = ((PathStream) getClient()).getURL(s.replace(" ",
31: "%20"));
32: if (s2.startsWith(((Task) connection.element).getStart()))
33: ((Task) connection.element).add(s2,
34: ((TaskConnection) connection).level + 1);
35: }
36: }
|