01: /*
02: * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: */
07: package javax.servlet;
08:
09: import java.io.IOException;
10: import java.io.OutputStream;
11:
12: /**
13: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
14: */
15: public abstract class ServletOutputStream extends OutputStream {
16: final String CR_LF = "\r\n";
17:
18: protected ServletOutputStream() {
19: super ();
20: }
21:
22: public void print(boolean b) throws IOException {
23: print("" + b);
24: }
25:
26: public void print(char c) throws IOException {
27: print("" + c);
28: }
29:
30: public void print(double d) throws IOException {
31: print("" + d);
32: }
33:
34: public void print(float f) throws IOException {
35: print("" + f);
36: }
37:
38: public void print(int i) throws IOException {
39: print("" + i);
40: }
41:
42: public void print(long l) throws IOException {
43: print("" + l);
44: }
45:
46: public void print(String s) throws IOException {
47: write(s.getBytes());
48: }
49:
50: public void println() throws IOException {
51: println("");
52: }
53:
54: public void println(boolean b) throws IOException {
55: println("" + b);
56: }
57:
58: public void println(char c) throws IOException {
59: println("" + c);
60: }
61:
62: public void println(double d) throws IOException {
63: println("" + d);
64: }
65:
66: public void println(float f) throws IOException {
67: println("" + f);
68: }
69:
70: public void println(int i) throws IOException {
71: println("" + i);
72: }
73:
74: public void println(long l) throws IOException {
75: println("" + l);
76: }
77:
78: public void println(String s) throws IOException {
79: print(s + CR_LF);
80: }
81: }
|