PayloadImpl.Inbound.newInstance(responseContentType, in);
if (inboundPayload == null)
throw new IOException(
strings.get("NoPayloadSupport", responseContentType));
PayloadFilesManager downloadedFilesMgr =
new PayloadFilesManager.Perm(fileOutputDir, null, logger,
new PayloadFilesManager.ActionReportHandler() {
@Override
public void handleReport(InputStream reportStream)
throws Exception {
handleResponse(options, reportStream,
urlConnection.getResponseCode(), userOut);
}
});
try {
downloadedFilesMgr.processParts(inboundPayload);
} catch (CommandException cex) {
throw cex;
} catch (Exception ex) {
throw new CommandException(ex.getMessage(), ex);
}