001: /*
002: * Enhydra Java Application Server Project
003: *
004: * The contents of this file are subject to the Enhydra Public License
005: * Version 1.1 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License on
007: * the Enhydra web site ( http://www.enhydra.org/ ).
008: *
009: * Software distributed under the License is distributed on an "AS IS"
010: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
011: * the License for the specific terms governing rights and limitations
012: * under the License.
013: *
014: * The Initial Developer of the Enhydra Application Server is Lutris
015: * Technologies, Inc. The Enhydra Application Server and portions created
016: * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
017: * All Rights Reserved.
018: *
019: * Contributor(s):
020: *
021: * $Id: HttpPresentationOutputStream.java,v 1.2 2006-06-15 13:40:47 sinisa Exp $
022: */
023:
024: package com.lutris.appserver.server.httpPresentation;
025:
026: import java.io.IOException;
027: import java.io.OutputStream;
028:
029: /**
030: * HTTP request output stream writter.
031: */
032: public abstract class HttpPresentationOutputStream extends OutputStream {
033:
034: //FIX: Need MIME-write functions.
035:
036: /**
037: * Prints the string provided.
038: *
039: * @exception IOException if an I/O error has occurred
040: */
041: public abstract void print(String s) throws IOException;
042:
043: /**
044: * Prints the boolean provided.
045: *
046: * @exception IOException if an I/O error has occurred.
047: */
048: public abstract void print(boolean b) throws IOException;
049:
050: /*
051: * Prints the character provided.
052: *
053: * @exception IOException if an I/O error has occurred
054: */
055: public abstract void print(char c) throws IOException;
056:
057: /**
058: * Prints the integer provided.
059: *
060: * @exception IOException if an I/O error has occurred
061: */
062: public abstract void print(int i) throws IOException;
063:
064: /**
065: * Prints the long provided.
066: *
067: * @exception IOException if an I/O error has occurred
068: */
069: public abstract void print(long l) throws IOException;
070:
071: /**
072: * Prints the float provided.
073: *
074: * @exception IOException if an I/O error has occurred
075: */
076: public abstract void print(float f) throws IOException;
077:
078: /**
079: * Prints the double provided.
080: *
081: * @exception IOException if an I/O error has occurred
082: */
083: public abstract void print(double d) throws IOException;
084:
085: /**
086: * Prints a CRLF.
087: *
088: * @exception IOException if an I/O error has occurred
089: */
090: public abstract void println() throws IOException;
091:
092: /**
093: * Prints the string provided, followed by a CRLF.
094: *
095: * @exception IOException if an I/O error has occurred
096: */
097: public abstract void println(String s) throws IOException;
098:
099: /**
100: * Prints the boolean provided, followed by a CRLF.
101: *
102: * @exception IOException if an I/O error has occurred.
103: */
104: public abstract void println(boolean b) throws IOException;
105:
106: /**
107: * Prints the character provided, followed by a CRLF.
108: *
109: * @exception IOException if an I/O error has occurred
110: */
111: public abstract void println(char c) throws IOException;
112:
113: /**
114: * Prints the integer provided, followed by a CRLF.
115: *
116: * @exception IOException if an I/O error has occurred
117: */
118: public abstract void println(int i) throws IOException;
119:
120: /**
121: * Prints the long provided, followed by a CRLF.
122: *
123: * @exception IOException if an I/O error has occurred
124: */
125: public abstract void println(long l) throws IOException;
126:
127: /**
128: * Prints the float provided, followed by a CRLF.
129: *
130: * @exception IOException if an I/O error has occurred
131: */
132: public abstract void println(float f) throws IOException;
133:
134: /**
135: * Prints the double provided, followed by a CRLF.
136: *
137: * @exception IOException if an I/O error has occurred
138: */
139: public abstract void println(double d) throws IOException;
140:
141: /*
142: * We disallow closing the output stream, but don't export the
143: * doc on this function.
144: */
145: public void close() throws IOException {
146: throw new IOException(
147: "HttpPresentationOutputStream may not be closed");
148: }
149: }
|