FakeHttpResponse.java
Upload User: gdxydsw
Upload Date: 2019-01-29
Package Size: 16721k
Code Size: 7k
Category:

Java Develop

Development Platform:

Java

  1. /*
  2.  * Copyright (c) 2006, JForum Team
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms,
  6.  * with or without modification, are permitted provided
  7.  * that the following conditions are met:
  8.  *
  9.  * 1) Redistributions of source code must retain the above
  10.  * copyright notice, this list of conditions and the
  11.  * following  disclaimer.
  12.  * 2)  Redistributions in binary form must reproduce the
  13.  * above copyright notice, this list of conditions and
  14.  * the following disclaimer in the documentation and/or
  15.  * other materials provided with the distribution.
  16.  * 3) Neither the name of "Rafael Steil" nor
  17.  * the names of its contributors may be used to endorse
  18.  * or promote products derived from this software without
  19.  * specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  22.  * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  23.  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
  24.  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  25.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  26.  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  27.  * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  28.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  29.  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  30.  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  31.  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  32.  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  33.  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  34.  * IN CONTRACT, STRICT LIABILITY, OR TORT
  35.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  36.  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  37.  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  38.  *
  39.  *
  40.  * The JForum Project
  41.  * http://www.jforum.net
  42.  */
  43. package net.jforum.http;
  44. import javax.servlet.ServletOutputStream;
  45. import javax.servlet.http.Cookie;
  46. import javax.servlet.http.HttpServletResponse;
  47. import java.io.IOException;
  48. import java.io.PrintWriter;
  49. import java.util.Locale;
  50. /**
  51.  * User: SergeMaslyukov
  52.  * Date: 24.08.2006
  53.  * Time: 23:51:07
  54.  * <p/>
  55.  * $Id: FakeHttpResponse.java,v 1.1 2006/08/24 21:02:58 sergemaslyukov Exp $
  56.  */
  57. public class FakeHttpResponse implements HttpServletResponse
  58. {
  59.     public void addCookie(Cookie cookie)
  60.     {
  61.         //To change body of implemented methods use File | Settings | File Templates.
  62.     }
  63.     public boolean containsHeader(String name)
  64.     {
  65.         return false;  //To change body of implemented methods use File | Settings | File Templates.
  66.     }
  67.     public String encodeURL(String url)
  68.     {
  69.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  70.     }
  71.     public String encodeRedirectURL(String url)
  72.     {
  73.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  74.     }
  75.     public String encodeUrl(String url)
  76.     {
  77.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  78.     }
  79.     public String encodeRedirectUrl(String url)
  80.     {
  81.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  82.     }
  83.     public void sendError(int sc, String msg) throws IOException
  84.     {
  85.         //To change body of implemented methods use File | Settings | File Templates.
  86.     }
  87.     public void sendError(int sc) throws IOException
  88.     {
  89.         //To change body of implemented methods use File | Settings | File Templates.
  90.     }
  91.     public void sendRedirect(String location) throws IOException
  92.     {
  93.         //To change body of implemented methods use File | Settings | File Templates.
  94.     }
  95.     public void setDateHeader(String name, long date)
  96.     {
  97.         //To change body of implemented methods use File | Settings | File Templates.
  98.     }
  99.     public void addDateHeader(String name, long date)
  100.     {
  101.         //To change body of implemented methods use File | Settings | File Templates.
  102.     }
  103.     public void setHeader(String name, String value)
  104.     {
  105.         //To change body of implemented methods use File | Settings | File Templates.
  106.     }
  107.     public void addHeader(String name, String value)
  108.     {
  109.         //To change body of implemented methods use File | Settings | File Templates.
  110.     }
  111.     public void setIntHeader(String name, int value)
  112.     {
  113.         //To change body of implemented methods use File | Settings | File Templates.
  114.     }
  115.     public void addIntHeader(String name, int value)
  116.     {
  117.         //To change body of implemented methods use File | Settings | File Templates.
  118.     }
  119.     public void setStatus(int sc)
  120.     {
  121.         //To change body of implemented methods use File | Settings | File Templates.
  122.     }
  123.     public void setStatus(int sc, String sm)
  124.     {
  125.         //To change body of implemented methods use File | Settings | File Templates.
  126.     }
  127.     public String getCharacterEncoding()
  128.     {
  129.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  130.     }
  131.     public String getContentType()
  132.     {
  133.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  134.     }
  135.     public ServletOutputStream getOutputStream() throws IOException
  136.     {
  137.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  138.     }
  139.     public PrintWriter getWriter() throws IOException
  140.     {
  141.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  142.     }
  143.     public void setCharacterEncoding(String charset)
  144.     {
  145.         //To change body of implemented methods use File | Settings | File Templates.
  146.     }
  147.     public void setContentLength(int len)
  148.     {
  149.         //To change body of implemented methods use File | Settings | File Templates.
  150.     }
  151.     public void setContentType(String type)
  152.     {
  153.         //To change body of implemented methods use File | Settings | File Templates.
  154.     }
  155.     public void setBufferSize(int size)
  156.     {
  157.         //To change body of implemented methods use File | Settings | File Templates.
  158.     }
  159.     public int getBufferSize()
  160.     {
  161.         return 0;  //To change body of implemented methods use File | Settings | File Templates.
  162.     }
  163.     public void flushBuffer() throws IOException
  164.     {
  165.         //To change body of implemented methods use File | Settings | File Templates.
  166.     }
  167.     public void resetBuffer()
  168.     {
  169.         //To change body of implemented methods use File | Settings | File Templates.
  170.     }
  171.     public boolean isCommitted()
  172.     {
  173.         return false;  //To change body of implemented methods use File | Settings | File Templates.
  174.     }
  175.     public void reset()
  176.     {
  177.         //To change body of implemented methods use File | Settings | File Templates.
  178.     }
  179.     public void setLocale(Locale loc)
  180.     {
  181.         //To change body of implemented methods use File | Settings | File Templates.
  182.     }
  183.     public Locale getLocale()
  184.     {
  185.         return null;  //To change body of implemented methods use File | Settings | File Templates.
  186.     }
  187. }