/** * Constructor * * @param type the type */ protected EscherRecord(EscherRecordType type) { data = new EscherRecordData(type); }
/** * Gets the data that was read in, excluding the header data * * @return the bytes read in, excluding the header data */ byte[] getBytes() { return data.getBytes(); }
/** * Accessor for the escher stream * * @return the escher stream */ protected final EscherStream getEscherStream() { return data.getEscherStream(); }
/** * Initializes the drawing data from the escher record read in */ private void initialize() { EscherRecordData er = new EscherRecordData(this, 0); Assert.verify(er.isContainer()); escherData = new EscherContainer(er); Assert.verify(escherData.getLength() == drawingData.length); Assert.verify(escherData.getType() == EscherRecordType.DGG_CONTAINER); initialized = true; }
EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos); EscherRecordType type = erd.getType(); if (type == EscherRecordType.DGG)
/** * Identifies whether this item is a container * * @param cont TRUE if this is a container, FALSE otherwise */ protected void setContainer(boolean cont) { data.setContainer(cont); }
/** * Accessor for the stream length * * @return the stream length */ protected int getStreamLength() { return data.getStreamLength(); }
/** * Gets the entire length of the record, including the header * * @return the length of the record, including the header data */ public int getLength() { return data.getLength() + HEADER_LENGTH; }
/** * Accessor for the instance * * @return the instance */ protected final int getInstance() { return data.getInstance(); }
/** * The position of this escher record in the stream * * @return the position */ protected final int getPos() { return data.getPos(); }
/** * Accessor for the escher type * * @return the type */ public EscherRecordType getType() { return data.getType(); }
/** * 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); } } }
/** * Initializes the drawing data from the escher record read in */ private void initialize() { EscherRecordData er = new EscherRecordData(this, 0); Assert.verify(er.isContainer()); escherData = new EscherContainer(er); Assert.verify(escherData.getLength() == drawingData.length); Assert.verify(escherData.getType() == EscherRecordType.DGG_CONTAINER); initialized = true; }
EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos); EscherRecordType type = erd.getType(); if (type == EscherRecordType.DGG)
/** * Identifies whether this item is a container * * @param cont TRUE if this is a container, FALSE otherwise */ protected void setContainer(boolean cont) { data.setContainer(cont); }
/** * Accessor for the stream length * * @return the stream length */ protected int getStreamLength() { return data.getStreamLength(); }
/** * Gets the entire length of the record, including the header * * @return the length of the record, including the header data */ public int getLength() { return data.getLength() + HEADER_LENGTH; }
/** * Accessor for the instance * * @return the instance */ protected final int getInstance() { return data.getInstance(); }
/** * The position of this escher record in the stream * * @return the position */ protected final int getPos() { return data.getPos(); }
/** * Accessor for the escher type * * @return the type */ public EscherRecordType getType() { return data.getType(); }