| Constructor and Description |
|---|
StreamResponse(java.io.InputStream stream,
int status,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Initializes the StreamResponse
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getHeader(java.lang.String headerName)
Return the header value
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders()
Returns the response headers
|
int |
getStatus()
Returns the response HTTP Status code
|
byte[] |
readAllBytes()
Reads the response stream to the end and returns the response bytes
|
java.lang.String |
readLine()
Reads one line from the response stream
|
java.lang.String |
readToEnd()
Reads the response stream to the end and returns its value as a String
|
public StreamResponse(java.io.InputStream stream,
int status,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
stream - stream to readstatus - HTTP status codepublic java.lang.String readToEnd()
throws java.io.IOException
Responsepublic int getStatus()
Responsepublic java.lang.String readLine()
throws java.io.IOException
Responsepublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
ResponsegetHeaders in interface Responsepublic java.util.List<java.lang.String> getHeader(java.lang.String headerName)
Responsepublic byte[] readAllBytes()
throws java.io.IOException
ResponsereadAllBytes in interface Responsejava.io.IOException