private String formatDataRead(UIMessages messages, long totalBytesRead, long bytesReadInCurrentInterval) { Pair<SizeUnit, Double> dataReadInCurrentInterval = SizeConverter.autoConvert(bytesReadInCurrentInterval, SizeUnit.BYTES); Pair<SizeUnit, Double> dataRead = SizeConverter.autoConvert(totalBytesRead, SizeUnit.BYTES); return messages.bytesReadInCurrentProfileInterval(formatSize(dataReadInCurrentInterval.getSecond()), dataReadInCurrentInterval.getFirst().name(), formatSize(dataRead.getSecond()), dataRead.getFirst().toString()); }