Package kong.unirest.core
Class ByteResponse
- java.lang.Object
-
- kong.unirest.core.BaseResponse<byte[]>
-
- kong.unirest.core.ByteResponse
-
- All Implemented Interfaces:
HttpResponse<byte[]>
public class ByteResponse extends BaseResponse<byte[]>
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
body
-
Constructor Summary
Constructors Constructor Description ByteResponse(RawResponse r, ProgressMonitor downloadMonitor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBody()
static byte[]
getBytes(java.io.InputStream is)
protected java.lang.String
getRawBody()
static boolean
isGzipped(java.lang.String value)
-
Methods inherited from class kong.unirest.core.BaseResponse
getCookies, getHeaders, getParsingError, getRequestSummary, getStatus, getStatusText, ifFailure, ifFailure, ifSuccess, isSuccess, map, mapBody, mapError, setParsingException
-
-
-
-
Constructor Detail
-
ByteResponse
public ByteResponse(RawResponse r, ProgressMonitor downloadMonitor)
-
-
Method Detail
-
getBytes
public static byte[] getBytes(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
isGzipped
public static boolean isGzipped(java.lang.String value)
-
getBody
public byte[] getBody()
- Specified by:
getBody
in interfaceHttpResponse<byte[]>
- Specified by:
getBody
in classBaseResponse<byte[]>
- Returns:
- the body
-
getRawBody
protected java.lang.String getRawBody()
- Specified by:
getRawBody
in classBaseResponse<byte[]>
-
-