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.Filebody
-
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.FilegetBody()private java.io.InputStreamgetContent(RawResponse r, ProgressMonitor downloadMonitor, java.nio.file.Path target)protected java.lang.StringgetRawBody()-
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:
getBodyin interfaceHttpResponse<java.io.File>- Specified by:
getBodyin classBaseResponse<java.io.File>- Returns:
- the body
-
getRawBody
protected java.lang.String getRawBody()
- Specified by:
getRawBodyin classBaseResponse<java.io.File>
-
-