|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.portlet.invocation.response.PortletInvocationResponse org.jboss.portal.portlet.invocation.response.FragmentResponse
Data produced.
Field Summary | |
private java.io.ByteArrayOutputStream |
bytes
The output as a bytes if any. |
private java.io.StringWriter |
chars
The output as chars if any. |
private java.lang.String |
contentType
The result content type if any. |
protected int |
expirationSecs
Number of seconds this result remains valid, a value of -1 indicates that it never expires. |
private java.lang.String |
header
Any content that should appear in the header. |
private java.lang.String |
title
The title if any. |
static int |
TYPE_BYTES
|
static int |
TYPE_CHARS
|
static int |
TYPE_EMPTY
|
private java.io.PrintWriter |
writer
The writer that will produce the chars output if any. |
Constructor Summary | |
FragmentResponse()
|
Method Summary | |
java.io.ByteArrayOutputStream |
getBytes()
Return the bytes of the content held by the fragment. |
java.io.StringWriter |
getChars()
Return the chars of the content held by the fragment. |
java.lang.String |
getContentType()
Return the content type of the generated fragment. |
int |
getExpirationSecs()
|
java.lang.String |
getHeader()
|
java.io.OutputStream |
getOutputStream()
|
java.lang.String |
getTitle()
Return the fragment title. |
int |
getType()
|
java.io.PrintWriter |
getWriter()
|
void |
resetBuffer()
|
void |
setContentType(java.lang.String contentType)
Set the fragment of the content type. |
void |
setExpirationSecs(int expirationSecs)
|
void |
setHeader(java.lang.String header)
|
void |
setTitle(java.lang.String title)
Set the fragment title. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_EMPTY
public static final int TYPE_CHARS
public static final int TYPE_BYTES
private java.lang.String header
private java.io.ByteArrayOutputStream bytes
private java.io.StringWriter chars
private java.io.PrintWriter writer
private java.lang.String contentType
private java.lang.String title
protected int expirationSecs
Constructor Detail |
public FragmentResponse()
Method Detail |
public java.lang.String getHeader()
public void setHeader(java.lang.String header)
public int getType()
public java.io.ByteArrayOutputStream getBytes() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the type is not bytespublic java.io.StringWriter getChars() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the type is not charspublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the new titlepublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- the content typepublic java.io.PrintWriter getWriter() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the output stream is already used or if no content type is definedpublic java.io.OutputStream getOutputStream() throws java.io.IOException, java.lang.IllegalStateException
java.io.IOException
java.lang.IllegalStateException
- if the window writer is already used or if no content type is definedpublic void resetBuffer()
public int getExpirationSecs()
public void setExpirationSecs(int expirationSecs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |