Stream the data synchronously.
SDMResponse resp = (SDMResponse)response; while((bytesRecvd = resp.getDataStream(buf,chunk_size))>0) { ... }