| Constructor and Description |
|---|
StreamResponse(InputStream stream,
int status,
Map<String,List<String>> headers)
Initializes the StreamResponse
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getHeader(String headerName)
Return the header value
|
Map<String,List<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 its value as a Byte[]
|
String |
readLine()
Reads one line from the response stream
|
String |
readToEnd()
Reads the response stream to the end and returns its value as a String
|
public StreamResponse(InputStream stream, int status, Map<String,List<String>> headers)
stream - stream to readstatus - HTTP status codeheaders - Headerspublic byte[] readAllBytes()
throws IOException
ResponsereadAllBytes in interface ResponseIOException - Exceptionpublic String readToEnd() throws IOException
ResponsereadToEnd in interface ResponseIOException - Exceptionpublic int getStatus()
Responsepublic String readLine() throws IOException
ResponsereadLine in interface ResponseIOException - Exceptionpublic Map<String,List<String>> getHeaders()
ResponsegetHeaders in interface ResponseCopyright © 2019. All rights reserved.