Constructor and Description |
---|
InputStreamBodyImpl(java.io.InputStream inputStream, java.lang.String contentType) |
Modifier and Type | Method and Description |
---|---|
JSONArray |
asJSONArray()
Return payload as JSON array
|
JSONObject |
asJSONObject()
Returns payload as JSON object
|
org.w3c.dom.Node |
asNode()
Returns payload as DOM object.
|
java.io.InputStream |
asStream()
Returns the payload as a stream
|
java.lang.String |
asString()
Returns the payload as a String
|
InputStreamBodyImpl |
disableBuffering() |
ContentType |
getContentType()
Returns the payload content type, if available
|
java.lang.String |
toString() |
public InputStreamBodyImpl(java.io.InputStream inputStream, java.lang.String contentType) throws java.io.IOException
java.io.IOException
public InputStreamBodyImpl disableBuffering()
public java.io.InputStream asStream() throws java.io.IOException
Body
public java.lang.String asString() throws java.io.IOException
Body
public JSONObject asJSONObject() throws java.io.IOException
Body
asJSONObject
in interface Body
java.io.IOException
- if an error occurs during the payload retrieval or conversionpublic JSONArray asJSONArray() throws java.io.IOException
Body
asJSONArray
in interface Body
java.io.IOException
- if an error occurs during the payload retrieval or conversionpublic org.w3c.dom.Node asNode() throws java.io.IOException
Body
public ContentType getContentType()
Body
getContentType
in interface Body
public java.lang.String toString()
toString
in class java.lang.Object