throw new UserErrorException("commands.noResults");
}
}
String prepareText() {
ScanInfo scanInfo = scanningResults.getScanInfo();
title2 = Labels.getLabel(scanInfo.isCompletedNormally() ?
"text.scan.completed" : "text.scan.incomplete");
String ln = System.getProperty("line.separator");
StringBuilder text = new StringBuilder();
text.append(Labels.getLabel("text.scan.time.total"))
.append(timeToText(scanInfo.getScanTime())).append(ln);
text.append(Labels.getLabel("text.scan.time.average"))
.append(timeToText((double)scanInfo.getScanTime() / scanInfo.getHostCount())).append(ln);
text.append(ln).append(scanningResults.getFeederName()).append(ln)
.append(scanningResults.getFeederInfo()).append(ln).append(ln);
text.append(Labels.getLabel("text.scan.hosts.total")).append(scanInfo.getHostCount()).append(ln);
text.append(Labels.getLabel("text.scan.hosts.alive")).append(scanInfo.getAliveCount()).append(ln);
if (scanInfo.getWithPortsCount() > 0)
text.append(Labels.getLabel("text.scan.hosts.ports")).append(scanInfo.getWithPortsCount()).append(ln);
return text.toString();
}