in src/main/java/com/awslabs/iot/client/helpers/progressbar/BasicProgressBarHelper.java [17:29]
public <T> ProgressBar start(String name, UsesStream<T> usesStream) {
// If there's no stream use an empty stream, get the stream, get the size, and rethrow all exceptions
long count = Try.of(() -> usesStream.getStream().size()).get();
if (progressBar != null) {
progressBar.close();
progressBar = null;
}
progressBar = new ProgressBar(name, count);
return progressBar;
}