public class HttpRequest.BufferedResponse
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes()
Return the result as bytes.
|
java.lang.String |
asString(java.lang.String encoding)
Return the result as a string.
|
HttpRequest.BufferedResponse |
saveContent(java.io.File file)
Save the result to a file.
|
HttpRequest.BufferedResponse |
saveContent(java.io.OutputStream out)
Save the result to an output stream.
|
public byte[] asBytes()
public java.lang.String asString(java.lang.String encoding) throws java.io.IOException
encoding
- the encodingjava.io.IOException
- on I/O errorpublic HttpRequest.BufferedResponse saveContent(java.io.File file) throws java.io.IOException, java.lang.InterruptedException
file
- the filejava.io.IOException
- on I/O errorjava.lang.InterruptedException
- on interruptionpublic HttpRequest.BufferedResponse saveContent(java.io.OutputStream out) throws java.io.IOException, java.lang.InterruptedException
out
- the output streamjava.io.IOException
- on I/O errorjava.lang.InterruptedException
- on interruption