hadChildren = true;
Object entry = it.next();
if(entry instanceof DirectoryNode) {
displayDirectory((DirectoryNode)entry, newIndent, withSizes);
} else {
DocumentNode doc = (DocumentNode)entry;
String name = doc.getName();
String size = "";
if(name.charAt(0) < 10) {
String altname = "(0x0" + (int)name.charAt(0) + ")" + name.substring(1);
name = name.substring(1) + " <" + altname + ">";
}
if(withSizes) {
size = " [" +
doc.getSize() + " / 0x" +
Integer.toHexString(doc.getSize()) +
"]";
}
System.out.println(newIndent + name + size);
}
}