001: /*
002: * Copyright (c) 1998-2003 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package javax.servlet.jsp;
031:
032: import java.io.IOException;
033: import java.io.Writer;
034:
035: abstract public class JspWriter extends Writer {
036: public static final int DEFAULT_BUFFER = -1;
037: public static final int NO_BUFFER = 0;
038: public static final int UNBOUNDED_BUFFER = -2;
039:
040: protected int bufferSize;
041: protected boolean autoFlush;
042:
043: protected JspWriter(int bufferSize, boolean autoFlush) {
044: this .bufferSize = bufferSize;
045: this .autoFlush = autoFlush;
046: }
047:
048: public abstract void print(boolean b) throws IOException;
049:
050: public abstract void print(char c) throws IOException;
051:
052: public abstract void print(int i) throws IOException;
053:
054: public abstract void print(long l) throws IOException;
055:
056: public abstract void print(float f) throws IOException;
057:
058: public abstract void print(double d) throws IOException;
059:
060: public abstract void print(char[] s) throws IOException;
061:
062: public abstract void print(String s) throws IOException;
063:
064: public abstract void print(Object o) throws IOException;
065:
066: public abstract void newLine() throws IOException;
067:
068: public abstract void println() throws IOException;
069:
070: public abstract void println(boolean b) throws IOException;
071:
072: public abstract void println(char c) throws IOException;
073:
074: public abstract void println(int i) throws IOException;
075:
076: public abstract void println(long l) throws IOException;
077:
078: public abstract void println(float f) throws IOException;
079:
080: public abstract void println(double d) throws IOException;
081:
082: public abstract void println(char[] s) throws IOException;
083:
084: public abstract void println(String s) throws IOException;
085:
086: public abstract void println(Object o) throws IOException;
087:
088: public abstract void clear() throws IOException;
089:
090: public abstract void clearBuffer() throws IOException;
091:
092: public abstract void flush() throws IOException;
093:
094: public int getBufferSize() {
095: return bufferSize;
096: }
097:
098: public abstract int getRemaining();
099:
100: public boolean isAutoFlush() {
101: return autoFlush;
102: }
103: }
|