public class ReportDownloadResponse extends Object
Constructor and Description |
---|
ReportDownloadResponse(RawReportDownloadResponse rawResponse)
Constructs a new instance from a successful raw response.
|
Modifier and Type | Method and Description |
---|---|
String |
getAsString()
Returns the contents of the response as a String.
|
String |
getHttpResponseMessage() |
int |
getHttpStatus() |
InputStream |
getInputStream() |
void |
saveToFile(String outputFile)
Writes the contents of the response to the specified File.
|
public ReportDownloadResponse(RawReportDownloadResponse rawResponse)
NullPointerException
- if rawResponse
is null.IllegalArgumentException
- if rawResponse
does not have a successful HTTP status.public int getHttpStatus()
public String getHttpResponseMessage()
@Nullable public InputStream getInputStream()
public String getAsString() throws IOException
IOException
- if unable to read the response contentspublic void saveToFile(String outputFile) throws FileNotFoundException, IOException
outputFile
- the output file to write toFileNotFoundException
- if unable to write to outputFile
IOException
- if unable to read the response contentsCopyright © 2018. All Rights Reserved.