|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.equilibrium.util.api.MGResponse
public class MGResponse
Represents the response from the MediaGenerator.
| Method Summary | |
|---|---|
void |
discard()
Forget the rest of the response. |
java.lang.String |
getContentKey()
Return the message key for the content or |
int |
getContentLength()
Return the content length for the content or 0. |
java.lang.String |
getContentMimeType()
Return the content mime type for the response. |
double |
getDoubleParam(java.lang.String key)
Return the parameter associated with key coerced to a double. |
java.lang.String |
getHttpHeader(java.lang.String key)
Return the named http header. |
java.util.Map |
getHttpHeaders()
Return the http header dictionary. |
int[] |
getIntArrayParam(java.lang.String key)
Return int array parameter from comma separated list response. |
int |
getIntParam(java.lang.String key)
Return the parameter associated key coerced to an integer. |
long |
getLongParam(java.lang.String key)
Return the parameter associated key coerced to a long integer. |
java.lang.String |
getParam(java.lang.String key)
Get a message response parameter. |
java.util.Set |
getParameters()
Return the keys collected from the message so far. |
java.lang.String |
getResponsePath()
Return the path to the generated file if there is one. |
int |
getStatusCode()
Return the status code for the reponse. |
java.lang.String |
getTextResponse()
Convenience method for getting a text-only response as a string. |
boolean |
hasContent()
Return true if the if there is file content available, false otherwise. |
int |
readContent(byte[] buf)
Fill the buffer with response data. |
boolean |
streamResponse(java.io.OutputStream outStream)
Stream the response to the designated stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean hasContent()
MGResponse.readContent(byte[])
public int getStatusCode()
public java.lang.String getContentKey()
public int readContent(byte[] buf)
throws java.io.IOException
buf - the buffer.
java.io.IOException
public boolean streamResponse(java.io.OutputStream outStream)
throws java.io.IOException
outStream - the output stream to send the response to.
java.io.IOException
public void discard()
throws java.io.IOException
java.io.IOExceptionpublic int getContentLength()
public java.util.Map getHttpHeaders()
public java.lang.String getHttpHeader(java.lang.String key)
key - header key.
public java.lang.String getContentMimeType()
public java.lang.String getResponsePath()
public java.lang.String getTextResponse()
throws java.io.IOException
java.io.IOException
public int getIntParam(java.lang.String key)
throws MGException
key - the key.
MGException
public long getLongParam(java.lang.String key)
throws MGException
key - the key.
MGException
public double getDoubleParam(java.lang.String key)
throws MGException
key - the key.
MGException
public int[] getIntArrayParam(java.lang.String key)
throws MGException
key - the key.
MGExceptionpublic java.lang.String getParam(java.lang.String key)
MessageCommands
key - the response parameter key.
public java.util.Set getParameters()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||