Package kong.unirest.core
Class FileResponse
- java.lang.Object
-
- kong.unirest.core.BaseResponse<java.io.File>
-
- kong.unirest.core.FileResponse
-
- All Implemented Interfaces:
HttpResponse<java.io.File>
public class FileResponse extends BaseResponse<java.io.File>
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
body
-
Constructor Summary
Constructors Constructor Description FileResponse(RawResponse r, java.lang.String path, ProgressMonitor downloadMonitor, java.nio.file.CopyOption... copyOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getBody()
private java.io.InputStream
getContent(RawResponse r, ProgressMonitor downloadMonitor, java.nio.file.Path target)
protected java.lang.String
getRawBody()
-
Methods inherited from class kong.unirest.core.BaseResponse
getCookies, getHeaders, getParsingError, getRequestSummary, getStatus, getStatusText, ifFailure, ifFailure, ifSuccess, isSuccess, map, mapBody, mapError, setParsingException
-
-
-
-
Constructor Detail
-
FileResponse
public FileResponse(RawResponse r, java.lang.String path, ProgressMonitor downloadMonitor, java.nio.file.CopyOption... copyOptions)
-
-
Method Detail
-
getContent
private java.io.InputStream getContent(RawResponse r, ProgressMonitor downloadMonitor, java.nio.file.Path target)
-
getBody
public java.io.File getBody()
- Specified by:
getBody
in interfaceHttpResponse<java.io.File>
- Specified by:
getBody
in classBaseResponse<java.io.File>
- Returns:
- the body
-
getRawBody
protected java.lang.String getRawBody()
- Specified by:
getRawBody
in classBaseResponse<java.io.File>
-
-