You can identify the file format with the value of Content-Type in the Response Header.
http://gw.machine.address:54080/rws/service/scanner/jobs/1bbr3nmj4zn6/file
This specification is based on the SmartSDK scan WebAPI ( ./xx_Release/doc/en/webapi/320-04-010.htm )
Http Header :Content-Type
Value:
1) image/tiff
2) image/jpeg
3) application/pdf
The ScanExRi sample code handles the file type with the following code:
private class GetFileTask extends AsyncTask
** We return the jobSetting(JSON) after the scan is completed because the scan parameters could be changed during a single scan job. When the document is set on the platen, we support changing the scan parameters while waiting for the next document. The jobSetting(JSON) contains the final parameters set.