Java Doc for GenericResponseWrapper.java in  » Database-ORM » MMBase » org » mmbase » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » MMBase » org.mmbase.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.servlet.ServletResponseWrapper
      javax.servlet.http.HttpServletResponseWrapper
         org.mmbase.util.GenericResponseWrapper

GenericResponseWrapper
public class GenericResponseWrapper extends HttpServletResponseWrapper (Code)
Wrapper around the response. It collects all data that is sent to it, and makes it available through a toString() method. It is used by taglib's Include-Tag, but it might find more general use, outside taglib.
author:
   Kees Jongenburger
author:
   Johannes Verelst
author:
   Michiel Meeuwissen
since:
   MMBase-1.7
version:
   $Id: GenericResponseWrapper.java,v 1.22 2008/02/20 12:01:49 michiel Exp $


Field Summary
public static  StringTEXT_XML_DEFAULT_CHARSET
    
protected  Stringredirected
    

Constructor Summary
public  GenericResponseWrapper(HttpServletResponse resp)
    
public  GenericResponseWrapper(HttpServletResponse resp, String encoding)
     Sets also a value for the characterEncoding which must be supposed.

Method Summary
public  voidaddCookie(Cookie c)
    
public  voidaddDateHeader(String arg0, long arg1)
    
public  voidaddHeader(String arg0, String arg1)
    
public  voidaddIntHeader(String arg0, int arg1)
    
public  booleancontainsHeader(String arg0)
    
protected  byte[]determinXMLEncoding()
    
public  StringencodeRedirectURL(String arg0)
    
public  StringencodeURL(String arg0)
    
public  StringgetCharacterEncoding()
     Returns the name of the charset used for the MIME body sent in this response.
public static  StringgetDefaultEncoding(String contentType)
     Supposes that no explicit charset is mentioned in a contentType, and returns a default.
public static  StringgetEncoding(String contentType)
     Takes the value of a Content-Type header, and tries to find the encoding from it.
public  HttpServletResponsegetHttpServletResponse()
     Gets the response object which this wrapper is wrapping.
public  LocalegetLocale()
    
public  ServletOutputStreamgetOutputStream()
     Return the OutputStream.
public  StringgetRedirected()
    
public  PrintWritergetWriter()
    
final public static  StringgetXMLEncoding(String xmlString)
    
public static  StringgetXMLEncoding(byte[] allBytes)
     Takes a ByteArrayInputStream, which is considered to be (the first) part of an XML, and returns the encoding.
public  voidsendError(int arg0, String arg1)
    
public  voidsendError(int arg0)
    
public  voidsendRedirect(String location)
    
public  voidsetContentType(String ct)
     Sets the content type of the response being sent to the client.
public  voidsetDateHeader(String arg0, long arg1)
    
public  voidsetHeader(String header, String value)
    
public  voidsetIntHeader(String arg0, int arg1)
    
public  voidsetLocale(Locale arg0)
    
public  voidsetStatus(int s)
    
public  StringtoString()
     Return all data that has been written to the PrintWriter.

Field Detail
TEXT_XML_DEFAULT_CHARSET
public static String TEXT_XML_DEFAULT_CHARSET(Code)



redirected
protected String redirected(Code)




Constructor Detail
GenericResponseWrapper
public GenericResponseWrapper(HttpServletResponse resp)(Code)
Public constructor



GenericResponseWrapper
public GenericResponseWrapper(HttpServletResponse resp, String encoding)(Code)
Sets also a value for the characterEncoding which must be supposed. Normally it would be determined automaticly right, but if for some reason it doesn't you can override it.




Method Detail
addCookie
public void addCookie(Cookie c)(Code)



addDateHeader
public void addDateHeader(String arg0, long arg1)(Code)

See Also:   javax.servlet.http.HttpServletResponse.addDateHeader(java.lang.Stringlong)



addHeader
public void addHeader(String arg0, String arg1)(Code)

See Also:   javax.servlet.http.HttpServletResponse.addHeader(java.lang.Stringjava.lang.String)



addIntHeader
public void addIntHeader(String arg0, int arg1)(Code)

See Also:   javax.servlet.http.HttpServletResponse.addIntHeader(java.lang.Stringint)



containsHeader
public boolean containsHeader(String arg0)(Code)

See Also:   javax.servlet.http.HttpServletResponse.containsHeader(java.lang.String)



determinXMLEncoding
protected byte[] determinXMLEncoding()(Code)



encodeRedirectURL
public String encodeRedirectURL(String arg0)(Code)

See Also:   javax.servlet.http.HttpServletResponse.encodeRedirectURL(java.lang.String)



encodeURL
public String encodeURL(String arg0)(Code)

See Also:   javax.servlet.http.HttpServletResponse.encodeURL(java.lang.String)



getCharacterEncoding
public String getCharacterEncoding()(Code)
Returns the name of the charset used for the MIME body sent in this response. If no charset has been assigned, it is implicitly set to ISO-8859-1 (Latin-1). See RFC 2047 for more information about character encoding and MIME. returns the encoding



getDefaultEncoding
public static String getDefaultEncoding(String contentType)(Code)
Supposes that no explicit charset is mentioned in a contentType, and returns a default. (UTF-8 or US-ASCII for XML types and ISO-8859-1 otherwise).
since:
   MMBase-1.7.1 A charset.



getEncoding
public static String getEncoding(String contentType)(Code)
Takes the value of a Content-Type header, and tries to find the encoding from it.
since:
   MMBase-1.7.1 The found charset if found, otherwise 'null'



getHttpServletResponse
public HttpServletResponse getHttpServletResponse()(Code)
Gets the response object which this wrapper is wrapping. You might need this when giving a redirect or so.
since:
   MMBase-1.7.1



getLocale
public Locale getLocale()(Code)

See Also:   javax.servlet.ServletResponse.getLocale



getOutputStream
public ServletOutputStream getOutputStream() throws IOException(Code)
Return the OutputStream. This is a 'MyServletOutputStream'.



getRedirected
public String getRedirected()(Code)

since:
   MMBase-1.8.5



getWriter
public PrintWriter getWriter() throws IOException(Code)
Return the PrintWriter



getXMLEncoding
final public static String getXMLEncoding(String xmlString)(Code)
Takes a String, which is considered to be (the first) part of an XML, and returns the encoding (the specified one, or the XML default) The XML Encoding, or null if the String was not recognized as XML (no <?xml> header found)
since:
   MMBase-1.7.1
See Also:   GenericResponseWrapper.getXMLEncoding(byte[])



getXMLEncoding
public static String getXMLEncoding(byte[] allBytes)(Code)
Takes a ByteArrayInputStream, which is considered to be (the first) part of an XML, and returns the encoding. The XML Encoding, or null if the String was not recognized as XML (not <?xml> header found)
since:
   MMBase-1.7.1
See Also:   GenericResponseWrapper.getXMLEncoding(String)



sendError
public void sendError(int arg0, String arg1) throws IOException(Code)

See Also:   javax.servlet.http.HttpServletResponse.sendError(intjava.lang.String)



sendError
public void sendError(int arg0) throws IOException(Code)

See Also:   javax.servlet.http.HttpServletResponse.sendError(int)



sendRedirect
public void sendRedirect(String location) throws IOException(Code)



setContentType
public void setContentType(String ct)(Code)
Sets the content type of the response being sent to the client. The content type may include the type of character encoding used, for example, text/html; charset=ISO-8859-4. If obtaining a PrintWriter, this method should be called first.



setDateHeader
public void setDateHeader(String arg0, long arg1)(Code)

See Also:   javax.servlet.http.HttpServletResponse.setDateHeader(java.lang.Stringlong)



setHeader
public void setHeader(String header, String value)(Code)



setIntHeader
public void setIntHeader(String arg0, int arg1)(Code)

See Also:   javax.servlet.http.HttpServletResponse.setIntHeader(java.lang.Stringint)



setLocale
public void setLocale(Locale arg0)(Code)

See Also:   javax.servlet.ServletResponse.setLocale(java.util.Locale)



setStatus
public void setStatus(int s)(Code)



toString
public String toString()(Code)
Return all data that has been written to the PrintWriter.



Methods inherited from javax.servlet.http.HttpServletResponseWrapper
public void addCookie(Cookie cookie)(Code)(Java Doc)
public void addDateHeader(String name, long date)(Code)(Java Doc)
public void addHeader(String name, String value)(Code)(Java Doc)
public void addIntHeader(String name, int value)(Code)(Java Doc)
public boolean containsHeader(String name)(Code)(Java Doc)
public String encodeRedirectURL(String url)(Code)(Java Doc)
public String encodeRedirectUrl(String url)(Code)(Java Doc)
public String encodeURL(String url)(Code)(Java Doc)
public String encodeUrl(String url)(Code)(Java Doc)
public void sendError(int sc, String msg) throws IOException(Code)(Java Doc)
public void sendError(int sc) throws IOException(Code)(Java Doc)
public void sendRedirect(String location) throws IOException(Code)(Java Doc)
public void setDateHeader(String name, long date)(Code)(Java Doc)
public void setHeader(String name, String value)(Code)(Java Doc)
public void setIntHeader(String name, int value)(Code)(Java Doc)
public void setStatus(int sc)(Code)(Java Doc)
public void setStatus(int sc, String sm)(Code)(Java Doc)

Methods inherited from javax.servlet.ServletResponseWrapper
public void flushBuffer() throws IOException(Code)(Java Doc)
public int getBufferSize()(Code)(Java Doc)
public String getCharacterEncoding()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public ServletOutputStream getOutputStream() throws IOException(Code)(Java Doc)
public ServletResponse getResponse()(Code)(Java Doc)
public PrintWriter getWriter() throws IOException(Code)(Java Doc)
public boolean isCommitted()(Code)(Java Doc)
public void reset()(Code)(Java Doc)
public void resetBuffer()(Code)(Java Doc)
public void setBufferSize(int size)(Code)(Java Doc)
public void setCharacterEncoding(String charset)(Code)(Java Doc)
public void setContentLength(int len)(Code)(Java Doc)
public void setContentType(String type)(Code)(Java Doc)
public void setLocale(Locale loc)(Code)(Java Doc)
public void setResponse(ServletResponse response)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.