public interface Message
| Modifier and Type | Method and Description |
|---|---|
String |
getContentCharset()
Returns the currently set content charset value, if any.
|
com.atlassian.fugue.Option<Long> |
getContentLength()
Returns the content length for the entity in the message.
|
String |
getContentType()
Returns the IANA media type, minus charset information, for the current entity, if any.
|
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. |
InputStream |
getEntityStream()
Returns the current entity as an input stream, or null if not set.
|
String |
getHeader(String name)
Returns the specified header by name.
|
Map<String,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.
|
String getContentType()
getContentCharset(). To get the full
Content-Type header value including charset if specified, use getHeader("Content-Type").String getContentCharset()
InputStream getEntityStream() throws IllegalStateException
hasEntity()
to check if this message has an entity value.IllegalStateException - If the non-null entity has already been accessed once, through
any accessor for this objectString getEntity() throws IllegalStateException, 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.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 StringIllegalArgumentException - If the entity exceeds the maximum sizeboolean hasEntity()
hasReadEntity() state.boolean hasReadEntity()
IllegalStateException being thrown.Map<String,String> getHeaders()
String getHeader(String name)
name - The name of the header to fetchcom.atlassian.fugue.Option<Long> getContentLength()
Copyright © 2012–2018 Atlassian. All rights reserved.