J
John B. Matthews
Mark Space said:John said:
Interesting, but:
private String bytesText(int perLine) {
String result = "";
for(int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(bytes);
result += leftPadded(bytes < 0 ? "FF" : hex, 2) + " ";
}
while (perLine-- > bytes.length) result += " ";
return result;
}
Ouch, lot's of string concatenation. What about using a
StringBuilder? Constructs like this make me doubt the usefulness of
the whole page.
Eeek! I was looking at the last entry, class HexDump, which is admirably
shorter and uses StringBuilder; but your point is well taken.