/** * Display the formatted escher stream * * @exception IOException */ public void display() throws IOException { EscherRecordData er = new EscherRecordData(stream, 0); EscherContainer ec = new EscherContainer(er); displayContainer(ec, 0); }
/** * Display the formatted escher stream * * @exception IOException */ public void display() throws IOException { EscherRecordData er = new EscherRecordData(stream, 0); EscherContainer ec = new EscherContainer(er); displayContainer(ec, 0); }
/** * Displays the escher container as text * * @param ec the escher container * @param level the indent level * @exception IOException */ private void displayContainer(EscherContainer ec, int level) throws IOException { displayRecord(ec, level); // Display the contents of the container level++; EscherRecord[] children = ec.getChildren(); for (int i = 0; i < children.length; i++) { EscherRecord er = children[i]; if (er.getEscherData().isContainer()) { displayContainer((EscherContainer) er, level); } else { displayRecord(er, level); } } }
/** * Displays the escher container as text * * @param ec the escher container * @param level the indent level * @exception IOException */ private void displayContainer(EscherContainer ec, int level) throws IOException { displayRecord(ec, level); // Display the contents of the container level++; EscherRecord[] children = ec.getChildren(); for (int i = 0; i < children.length; i++) { EscherRecord er = children[i]; if (er.getEscherData().isContainer()) { displayContainer((EscherContainer) er, level); } else { displayRecord(er, level); } } }