org.apache.wicket.response
Class StringResponse
java.lang.Object
org.apache.wicket.Response
org.apache.wicket.response.StringResponse
public class StringResponse
- extends Response
Response object that writes to a StringWriter. If the StringResponse is later converted to a
String via toString(), the output which was written to the StringResponse will be returned as a
String.
- Author:
- Jonathan Locke
Method Summary |
java.lang.CharSequence |
getBuffer()
|
java.io.OutputStream |
getOutputStream()
|
void |
reset()
Called when the Response needs to reset itself. |
java.lang.String |
toString()
|
void |
write(java.lang.CharSequence string)
Writes the given string to the Response subclass output destination. |
Methods inherited from class org.apache.wicket.Response |
close, detectContentType, encodeURL, filter, getCharacterEncoding, isRedirect, println, redirect, setCharacterEncoding, setContentLength, setContentType, setLastModifiedTime, setLocale, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
out
protected final AppendingStringBuffer out
- StringWriter to write to
StringResponse
public StringResponse()
- Constructor
write
public void write(java.lang.CharSequence string)
- Description copied from class:
Response
- Writes the given string to the Response subclass output destination.
- Specified by:
write
in class Response
- Parameters:
string
- The string to write- See Also:
Response.write(CharSequence)
reset
public void reset()
- Description copied from class:
Response
- Called when the Response needs to reset itself. Subclasses can empty there buffer or build up
state.
- Overrides:
reset
in class Response
- See Also:
Response.reset()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
getBuffer
public java.lang.CharSequence getBuffer()
- Returns:
- The internal buffer directly as a
CharSequence
getOutputStream
public java.io.OutputStream getOutputStream()
- Specified by:
getOutputStream
in class Response
- Returns:
- The output stream for this response
- See Also:
Response.getOutputStream()
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.