private void processChildren(String prefix, String parent, Map<String, String> atts, StringBuilder sb) { Map<String,Map<String,String>> kids = response.getChildren(atts); if(kids == null || kids.isEmpty()) return; String childrenType = atts.get(AdminCommandResponse.CHILDREN_TYPE); int index = (parent == null) ? 0 : parent.length() + 1; for(Map.Entry<String, Map<String,String>> entry : kids.entrySet()) { String container = entry.getKey(); if (sb.length() > 0) sb.append(EOL); if(ok(childrenType)) { sb.append(prefix).append(childrenType).append(" : "); } try { sb.append(java.net.URLDecoder.decode(container.substring(index), "UTF-8")); } catch (Exception e) { sb.append(container.substring(index)); } processOneLevel(prefix + TAB, container, entry.getValue(), sb); } }
private void processChildren(String prefix, String parent, Map<String, String> atts, StringBuilder sb) { Map<String,Map<String,String>> kids = response.getChildren(atts); if(kids == null || kids.isEmpty()) return; String childrenType = atts.get(AdminCommandResponse.CHILDREN_TYPE); int index = (parent == null) ? 0 : parent.length() + 1; for(Map.Entry<String, Map<String,String>> entry : kids.entrySet()) { String container = entry.getKey(); if (sb.length() > 0) sb.append(EOL); if(ok(childrenType)) { sb.append(prefix).append(childrenType).append(" : "); } try { sb.append(java.net.URLDecoder.decode(container.substring(index), "UTF-8")); } catch (Exception e) { sb.append(container.substring(index)); } processOneLevel(prefix + TAB, container, entry.getValue(), sb); } }