01: package pygmy.core;
02:
03: import java.io.*;
04:
05: public class InternetOutputStream extends BufferedOutputStream {
06:
07: public InternetOutputStream(OutputStream out) {
08: super (out);
09: }
10:
11: public InternetOutputStream(OutputStream out, int size) {
12: super (out, size);
13: }
14:
15: public void print(String buffer) throws IOException {
16: print(buffer, 0, buffer.length());
17: }
18:
19: public void println() throws IOException {
20: write(Http.CRLF.getBytes());
21: }
22:
23: public void print(String text, int offset, int len)
24: throws IOException {
25: write(text.getBytes(), offset, len);
26: }
27:
28: public void println(String text) throws IOException {
29: print(text);
30: println();
31: }
32:
33: public void print(int i) throws IOException {
34: print(String.valueOf(i));
35: }
36:
37: public void println(int i) throws IOException {
38: print(i);
39: println();
40: }
41: }
|