/*
 *  eXist Open Source Native XML Database
 *  Copyright (C) 2001-06 Wolfgang M. Meier
 *  wolfgang@exist-db.org
 *  http://exist.sourceforge.net
 *  
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *  
 *  $Id: ResponseWrapper.java 4311 2006-09-07 02:33:16Z wolfgang_m $
 */
package org.exist.http.servlets;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Locale;

/**
 * @author Wolfgang Meier (wolfgang@exist-db.org)
 */
public interface ResponseWrapper {
	
	/**
	 * @param name	Name of the Cookie
	 * @param value	Value of the Cookie
	 */
	public void addCookie(String name, String value);
	
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void addDateHeader(String arg0, long arg1);
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void addHeader(String arg0, String arg1);
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void addIntHeader(String arg0, int arg1);
	/**
	 * @param arg0 The name of the header.
	 * @return A boolean value indicating whether it contains the header name.
	 */
	public boolean containsHeader(String arg0);
	/**
	 * @param arg0
	 * @return The encoded value
	 */
	public String encodeURL(String arg0);
	/***/
	public void flushBuffer() throws IOException;
	/**
	 * @return Returns the default character encoding
	 */
	public String getCharacterEncoding();
	/**
	 * @return Returns the default locale
	 */
	public Locale getLocale();
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void setDateHeader(String arg0, long arg1);
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void setHeader(String arg0, String arg1);
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void setIntHeader(String arg0, int arg1);
	/**
	 * @param arg0
	 */
	public void setLocale(Locale arg0);
	
	public void sendRedirect(String arg0) throws IOException;
	
	/** @return the value of Date Header corresponding to given name,
	 * 0 if none has been set. */
	public long getDateHeader(String name);
    
    public OutputStream getOutputStream() throws IOException;
}