001: /*
002: * Copyright 2002 Sun Microsystems, Inc. All
003: * rights reserved. Use of this product is subject
004: * to license terms. Federal Acquisitions:
005: * Commercial Software -- Government Users
006: * Subject to Standard License Terms and
007: * Conditions.
008: *
009: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
010: * are trademarks or registered trademarks of Sun Microsystems,
011: * Inc. in the United States and other countries.
012: */
013: package com.sun.portal.portlet.impl;
014:
015: import java.io.IOException;
016: import java.io.PrintStream;
017: import java.io.OutputStream;
018:
019: import javax.servlet.ServletOutputStream;
020:
021: public class PSServletOutputStream extends ServletOutputStream {
022:
023: private PrintStream _printStream;
024:
025: public PSServletOutputStream(OutputStream outStream) {
026: _printStream = new PrintStream(outStream);
027: }
028:
029: // for all methods of the ServletOutputStream/OutoutStream
030: // delegate to the _printStream
031:
032: public void close() {
033: _printStream.close();
034: }
035:
036: public void flush() {
037: _printStream.flush();
038: }
039:
040: public void write(byte[] b) throws IOException {
041: _printStream.write(b);
042: }
043:
044: public void write(byte[] b, int off, int len) throws IOException {
045: _printStream.write(b, off, len);
046: }
047:
048: public void write(int b) throws IOException {
049: _printStream.write(b);
050: }
051:
052: public void print(boolean b) {
053: _printStream.print(b);
054: }
055:
056: public void print(char c) {
057: _printStream.print(c);
058: }
059:
060: public void print(double d) {
061: _printStream.print(d);
062: }
063:
064: public void print(float f) {
065: _printStream.print(f);
066: }
067:
068: public void print(int i) {
069: _printStream.print(i);
070: }
071:
072: public void print(long l) {
073: _printStream.print(l);
074: }
075:
076: public void print(String s) {
077: _printStream.print(s);
078: }
079:
080: public void println() {
081: _printStream.println();
082: }
083:
084: public void println(boolean b) {
085: _printStream.println(b);
086: }
087:
088: public void println(char c) {
089: _printStream.println(c);
090: }
091:
092: public void println(double d) {
093: _printStream.println(d);
094: }
095:
096: public void println(float f) {
097: _printStream.println(f);
098: }
099:
100: public void println(int i) {
101: _printStream.println(i);
102: }
103:
104: public void println(long l) {
105: _printStream.println(l);
106: }
107:
108: public void println(String s) {
109: _printStream.println(s);
110: }
111: }
|