001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.writer;
020
021import java.io.IOException;
022import java.io.OutputStream;
023
024import javax.servlet.jsp.JspWriter;
025
026import lucee.runtime.cache.legacy.CacheItem;
027
028public abstract class CFMLWriter extends JspWriter {
029        
030        protected CFMLWriter(int bufferSize, boolean autoFlush) {
031                super(bufferSize, autoFlush);
032        }
033
034        public abstract OutputStream getResponseStream() throws IOException;
035        
036        public abstract void setClosed(boolean b) ;
037
038        public abstract void setBufferConfig(int interval, boolean b) throws IOException ;
039
040
041        public abstract void appendHTMLBody(String text) throws IOException;
042        
043        public abstract void writeHTMLBody(String text) throws IOException;
044
045        public abstract void flushHTMLBody() throws IOException;
046
047        public abstract String getHTMLBody() throws IOException;
048        
049        public abstract void resetHTMLBody() throws IOException;
050
051        public abstract void appendHTMLHead(String text) throws IOException;
052
053        public abstract void writeHTMLHead(String text) throws IOException;
054
055        public abstract void flushHTMLHead() throws IOException;
056
057        public abstract String getHTMLHead() throws IOException;
058
059        public abstract void resetHTMLHead() throws IOException;
060
061
062        /**
063         * write the given string without removing whitespace.
064         * @param str
065         * @throws IOException 
066         */
067        public abstract void writeRaw(String str) throws IOException;
068
069        public abstract void setAllowCompression(boolean allowCompression);
070        
071
072        public abstract void doCache(lucee.runtime.cache.legacy.CacheItem ci);
073
074        /**
075         * @return the cacheResource
076         */
077        public abstract CacheItem getCacheItem();
078
079}