62636465666768697071727374
return curr; } protected Joint readChild(String childName, Joint curr, boolean endSite) { Joint child; curr.addChild(child = new Joint(childName)); child.setParent(curr); if(!endSite) count++; return child; }
114115116117118119120121122123
} } protected Joint readRoot(String rootname) { root = new Joint(rootname); root.setStartChannel(0); return root; }
132133134135136137138139140141142
*/ public void read(String filename) throws IOException { BufferedReader in = new BufferedReader(new FileReader(filename)); Deque<Joint> deque = new ArrayDeque<Joint>(); Joint curr, child; String[] elements; String line; channels = 0; count = 1;