src/main/java/net/leanix/api/common/ApiClient.java
public File downloadFileFromResponse(Response response) throws ApiException {
    try {
      File file = prepareDownloadFile(response);
      Files.copy(response.readEntity(InputStream.class), file.toPath());
      return file;
    } catch (IOException e) {
      throw new ApiException(e);
    }
  }
public File downloadFileFromResponse(Response response) throws ApiException {
    try {
      File file = prepareDownloadFile(response);
      Files.copy(response.readEntity(InputStream.class), file.toPath());
      return file;
    } catch (IOException e) {
      throw new ApiException(e);
    }
  }
public File downloadFileFromResponse ( Response response ) throws ApiException { try { File file = prepareDownloadFile ( response ) ; Files . copy ( response . readEntity ( InputStream . class ) , file . toPath ( ) ) ; return file ; } catch ( IOException e ) { throw new ApiException ( e ) ; } }
Download file from the given response.
@throws ApiException If fail to read file content from response and write to disk
Download file from the given response .