Java Doc for JoServletResponse.java in  » Web-Server » jo » com » tagtraum » jo » 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 » Web Server » jo » com.tagtraum.jo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.tagtraum.jo.JoServletResponse

JoServletResponse
public class JoServletResponse implements I_JoServletResponse,C_Http,C_Jo(Code)
Represents the response.
version:
   1.1beta1 $Id: JoServletResponse.java,v 1.20 2005/05/26 16:36:04 hendriks73 Exp $
author:
   Hendrik Schreiber
See Also:   I_JoServletResponse
See Also:   I_JoServletRequest
See Also:   JoServletRequest
See Also:   JoServletHandler


Field Summary
final public static  StringDEFAULT_CHARENCODING
    
final public static  intEIGHT_KB
    
final public static  intFOUR_KB
    
public static  Stringvcid
    

Constructor Summary
public  JoServletResponse()
    

Method Summary
public  voidaddCookie(Cookie cookie)
    
public  voidaddDateHeader(String aName, long aDate)
     Adds a Date as header.
public  voidaddHeader(String aKey, String aValue)
     Adds a header.
public  voidaddIntHeader(String aName, int aValue)
     Adds an int as header.
public  voidclose()
     Closes the writer or JoOutputStream .
public  booleancontainsHeader(String headerKey)
     Checks whether a certain header is set.
public  StringencodeRedirectURL(String aUrl)
    
public  StringencodeRedirectUrl(String aUrl)
    
public  StringencodeURL(String url)
    
public  StringencodeUrl(String aUrl)
    
public  voidflushBuffer()
     Commits this response.
public  intgetBufferSize()
     Returns the actual buffer size.
public  StringgetCharacterEncoding()
     Return the encoding of the current content type.
public  longgetDateHeader(String aName)
     Returns a header as date (long).
public  StringgetHeader(String aKey)
     Returns a headervalue as string, or nullif it has not been set.
public  EnumerationgetHeaderNames()
     Returns an enumeration of the headernames.
public  intgetIntHeader(String aName)
     Returns a header as int.
public  ServletOutputStreamgetInternalOutputStream()
     Returns an internal ServletOutputStream.
public  LocalegetLocale()
     Returns the locale.
public  ServletOutputStreamgetOutputStream()
     Returns a ServletOutputStream.
public  intgetSentBodyBytes()
     Returns how many bytes were sent.
public  intgetStatus()
     Returns the current HTTP status.
public  PrintWritergetWriter()
     Returns a PrintWriter.
public  voidinit()
     Initializes this response.
public  booleanisCommitted()
     Indicates whether the the response has been committed yet, i.e.
public  voidreset()
     Resets the response, including the headers.
public  voidresetBuffer()
     Resets the response, without resetting any headers.
public  voidsendError(Exception exception, String servletName)
     Sends an error message to the client.
public  voidsendError(int aCode, String aMessage)
     Sends an error message to the client.
public  voidsendError(int code)
     Sends an errormessage to the client.
public  voidsendRedirect(String aLocation)
     Sends a SC_MOVED_TEMPORARILY to the client.
public  voidsetBufferSize(int size)
     Sets the buffer size for this response.
public  voidsetContentLength(int len)
     Sets the length of the body.
public  voidsetContentType(String aType)
     Sets the Content-Type.
public  voidsetDateHeader(String aName, long aDate)
     Sets a Date as header.
public  voidsetForceClose(boolean forceClose)
    
public  voidsetHeader(String aKey, String aValue)
     Sets a header.
public  voidsetIntHeader(String aName, int aValue)
     Sets an int as header.
public  voidsetLocale(Locale locale)
     Sets the locale.
public  voidsetRequest(I_JoServletRequest request)
     Sets the associated request.
public  voidsetServletContextPeer(I_JoServletContextPeer peer)
     Sets the peer that belongs to this response.
public  voidsetSocket(Socket socket)
     Sets the socket for this response.
public  voidsetStatus(int aCode, String aMessage)
     Sets the HTTP statuscode.
public  voidsetStatus(int aCode)
     Sets the statuscode.
public  voidwriteHeaders()
     Writes the headers if they have not been written yet.

Field Detail
DEFAULT_CHARENCODING
final public static String DEFAULT_CHARENCODING(Code)



EIGHT_KB
final public static int EIGHT_KB(Code)



FOUR_KB
final public static int FOUR_KB(Code)



vcid
public static String vcid(Code)
Source-Version




Constructor Detail
JoServletResponse
public JoServletResponse()(Code)




Method Detail
addCookie
public void addCookie(Cookie cookie)(Code)
Sets a Cooies as header as specified by http://home.netscape.com/newsref/std/cookie_spec.html
Parameters:
  cookie - Cookie



addDateHeader
public void addDateHeader(String aName, long aDate)(Code)
Adds a Date as header.
Parameters:
  aName - header name
Parameters:
  aDate - date as long



addHeader
public void addHeader(String aKey, String aValue)(Code)
Adds a header.
Parameters:
  aKey - key
Parameters:
  aValue - value



addIntHeader
public void addIntHeader(String aName, int aValue)(Code)
Adds an int as header.
Parameters:
  aName - header name
Parameters:
  aValue - header value



close
public void close() throws IOException(Code)
Closes the writer or JoOutputStream .



containsHeader
public boolean containsHeader(String headerKey)(Code)
Checks whether a certain header is set.
Parameters:
  headerKey - name of the header true or false



encodeRedirectURL
public String encodeRedirectURL(String aUrl)(Code)
Encodes a redirect URL fo URL rewriting
Parameters:
  aUrl - URL encoded URL



encodeRedirectUrl
public String encodeRedirectUrl(String aUrl)(Code)
Encodes a redirect URL fo URL rewriting
Parameters:
  aUrl - URL encoded URL



encodeURL
public String encodeURL(String url)(Code)
Encodes a URL fo URL rewriting
Parameters:
  url - URL encoded URL



encodeUrl
public String encodeUrl(String aUrl)(Code)
Encodes a URL fo URL rewriting
Parameters:
  aUrl - URL encoded URL



flushBuffer
public void flushBuffer() throws IOException(Code)
Commits this response.
See Also:   JoServletResponse.isCommitted()



getBufferSize
public int getBufferSize()(Code)
Returns the actual buffer size. buffer size in bytes
See Also:   JoServletResponse.setBufferSize(int)



getCharacterEncoding
public String getCharacterEncoding()(Code)
Return the encoding of the current content type. the Charset



getDateHeader
public long getDateHeader(String aName)(Code)
Returns a header as date (long).
Parameters:
  aName - header name value as long, -1 if the header is not set



getHeader
public String getHeader(String aKey)(Code)
Returns a headervalue as string, or nullif it has not been set.
Parameters:
  aKey - header name header value



getHeaderNames
public Enumeration getHeaderNames()(Code)
Returns an enumeration of the headernames. enumeration



getIntHeader
public int getIntHeader(String aName)(Code)
Returns a header as int.
Parameters:
  aName - header name value as int, -1 if the header is not set



getInternalOutputStream
public ServletOutputStream getInternalOutputStream() throws IOException(Code)
Returns an internal ServletOutputStream. an internal ServletOutputStream



getLocale
public Locale getLocale()(Code)
Returns the locale. locale
See Also:   JoServletResponse.setLocale(Locale)



getOutputStream
public ServletOutputStream getOutputStream() throws IOException(Code)
Returns a ServletOutputStream.
exception:
  IllegalStateException - if we got a writer before the ServletOutputStream



getSentBodyBytes
public int getSentBodyBytes()(Code)
Returns how many bytes were sent.



getStatus
public int getStatus()(Code)
Returns the current HTTP status. current status



getWriter
public PrintWriter getWriter() throws IOException(Code)
Returns a PrintWriter. Before you call this method you chould call JoServletResponse.setContentType(String) as that makes sure that you use the correct character encoding.
exception:
  IllegalStateException - if JoServletResponse.getOutputStream() was called before a PrintWriter



init
public void init()(Code)
Initializes this response.
See Also:   JoServletHandler



isCommitted
public boolean isCommitted()(Code)
Indicates whether the the response has been committed yet, i.e. whether content has been written to the client yet. true or false
See Also:   JoServletResponse.flushBuffer()



reset
public void reset()(Code)
Resets the response, including the headers.
See Also:   JoServletResponse.isCommitted()



resetBuffer
public void resetBuffer()(Code)
Resets the response, without resetting any headers.
See Also:   JoServletResponse.isCommitted()



sendError
public void sendError(Exception exception, String servletName) throws IOException(Code)
Sends an error message to the client.
Parameters:
  exception - Throwable



sendError
public void sendError(int aCode, String aMessage) throws IOException(Code)
Sends an error message to the client.
Parameters:
  aCode - the Statuscode
Parameters:
  aMessage - message



sendError
public void sendError(int code) throws IOException(Code)
Sends an errormessage to the client.
Parameters:
  code - the statuscode
See Also:   JoServletResponse.sendError(int,String)



sendRedirect
public void sendRedirect(String aLocation) throws IOException(Code)
Sends a SC_MOVED_TEMPORARILY to the client.
Parameters:
  aLocation - absolut URL



setBufferSize
public void setBufferSize(int size)(Code)
Sets the buffer size for this response. The buffer is not necessarily set to the size you are trying to set, but at least to the size you are trying to set. This happens in order to reuse buffers.
Parameters:
  size - size in bytes
exception:
  IllegalArgumentException - if you try to set a negative size
exception:
  IllegalStateException - if JoServletResponse.isCommitted() returns true
See Also:    #reset();
See Also:    #isCommitted();
See Also:    #getBufferSize();



setContentLength
public void setContentLength(int len)(Code)
Sets the length of the body.
Parameters:
  len - the length



setContentType
public void setContentType(String aType)(Code)
Sets the Content-Type.
Parameters:
  aType - the MIME-Typ



setDateHeader
public void setDateHeader(String aName, long aDate)(Code)
Sets a Date as header.
Parameters:
  aName - header name
Parameters:
  aDate - date as long



setForceClose
public void setForceClose(boolean forceClose)(Code)



setHeader
public void setHeader(String aKey, String aValue)(Code)
Sets a header.
Parameters:
  aKey - key
Parameters:
  aValue - value



setIntHeader
public void setIntHeader(String aName, int aValue)(Code)
Sets an int as header.
Parameters:
  aName - header name
Parameters:
  aValue - header value



setLocale
public void setLocale(Locale locale)(Code)
Sets the locale.
Parameters:
  locale -
See Also:   JoServletResponse.getLocale()



setRequest
public void setRequest(I_JoServletRequest request)(Code)
Sets the associated request.
Parameters:
  request - associated request



setServletContextPeer
public void setServletContextPeer(I_JoServletContextPeer peer)(Code)
Sets the peer that belongs to this response.
Parameters:
  peer - associated peer



setSocket
public void setSocket(Socket socket) throws IOException(Code)
Sets the socket for this response.
Parameters:
  socket - this response's Socket.



setStatus
public void setStatus(int aCode, String aMessage)(Code)
Sets the HTTP statuscode.
Parameters:
  aCode - the statuscode
Parameters:
  aMessage - a message
See Also:   JoServletResponse.setStatus(int)



setStatus
public void setStatus(int aCode)(Code)
Sets the statuscode.
Parameters:
  aCode - the statuscode
See Also:   JoServletResponse.setStatus(int,String)



writeHeaders
public void writeHeaders() throws IOException(Code)
Writes the headers if they have not been written yet.



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.