formatSize cleanups
This commit is contained in:
@ -142,7 +142,7 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
buf.append(_pct.format(pct));
|
||||
}
|
||||
buf.append(": ");
|
||||
buf.append(_("{0}B transferred", DataHelper.formatSize(currentWrite + alreadyTransferred)));
|
||||
buf.append(_("{0}B transferred", DataHelper.formatSize2(currentWrite + alreadyTransferred)));
|
||||
updateStatus(buf.toString());
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class TunnelRenderer {
|
||||
}
|
||||
out.write("</table>\n");
|
||||
out.write("<div class=\"statusnotes\"><b>" + _("Inactive participating tunnels") + ": " + inactive + "</b></div>\n");
|
||||
out.write("<div class=\"statusnotes\"><b>" + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize(processed*1024) + "B</b></div>\n");
|
||||
out.write("<div class=\"statusnotes\"><b>" + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
|
||||
renderPeers(out);
|
||||
}
|
||||
|
||||
@ -215,8 +215,9 @@ public class TunnelRenderer {
|
||||
}
|
||||
if (live <= 0)
|
||||
out.write("<div class=\"statusnotes\"><center><b>" + _("No tunnels; waiting for the grace period to end.") + "</center></b></div>\n");
|
||||
out.write("<div class=\"statusnotes\"><center><b>" + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize(processedIn*1024) + "B " + _("in") + ", " +
|
||||
DataHelper.formatSize(processedOut*1024) + "B " + _("out") + "</b></center></div>");
|
||||
out.write("<div class=\"statusnotes\"><center><b>" + _("Lifetime bandwidth usage") + ": " +
|
||||
DataHelper.formatSize2(processedIn*1024) + "B " + _("in") + ", " +
|
||||
DataHelper.formatSize2(processedOut*1024) + "B " + _("out") + "</b></center></div>");
|
||||
}
|
||||
|
||||
private void renderPeers(Writer out) throws IOException {
|
||||
|
@ -176,7 +176,7 @@ public class UpdateHandler {
|
||||
buf.append(_pct.format(pct));
|
||||
}
|
||||
buf.append(":<br>\n");
|
||||
buf.append(_("{0}B transferred", DataHelper.formatSize(currentWrite + alreadyTransferred)));
|
||||
buf.append(_("{0}B transferred", DataHelper.formatSize2(currentWrite + alreadyTransferred)));
|
||||
updateStatus(buf.toString());
|
||||
}
|
||||
public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) {
|
||||
|
Reference in New Issue
Block a user