| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentCharset()
Returns the currently set content charset value, if any.
|
java.lang.String |
getContentType()
Returns the IANA media type, minus charset information, for the current entity, if any.
|
java.lang.String |
getEntity()
Returns the current entity in
String form, if available, converting the underlying
entity stream to a string using the currently set content charset, or defaulting to the HTTP
standard of "ISO-8859-1" if no content charset has been specified. |
java.io.InputStream |
getEntityStream()
Returns the current entity as an input stream, or null if not set.
|
java.lang.String |
getHeader(java.lang.String name)
Returns the specified header by name.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Returns a map of all headers that have been set on this object.
|
boolean |
hasEntity()
Returns whether or not an entity has been set on this object.
|
boolean |
hasReadEntity()
Returns whether or not the current entity property, if any, has been read from this object.
|
java.lang.String getContentType()
getContentCharset(). To get the full
Content-Type header value including charset if specified, use getHeader("Content-Type").java.lang.String getContentCharset()
java.io.InputStream getEntityStream()
throws java.lang.IllegalStateException
hasEntity()
to check if this message has an entity value.java.lang.IllegalStateException - If the non-null entity has already been accessed once, through
any accessor for this objectjava.lang.String getEntity()
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
String form, if available, converting the underlying
entity stream to a string using the currently set content charset, or defaulting to the HTTP
standard of "ISO-8859-1" if no content charset has been specified.java.lang.IllegalStateException - If the non-null entity has already been accessed once, through
any accessor for this object. Also thrown if underlying body cannot be converted into a Stringjava.lang.IllegalArgumentException - If the entity exceeds the maximum sizeboolean hasEntity()
hasReadEntity() state.boolean hasReadEntity()
IllegalStateException being thrown.java.util.Map<java.lang.String,java.lang.String> getHeaders()
java.lang.String getHeader(java.lang.String name)
name - The name of the header to fetchCopyright © 2012-2013 Atlassian. All Rights Reserved.