/** * Adds a cluster to this record * * @param dgid the id * @param sids the sid */ void addCluster(int dgid, int sids) { Cluster c = new Cluster(dgid, sids); clusters.add(c); }
/** * Constructor * * @param erd the read in data */ public Dgg(EscherRecordData erd) { super(erd); clusters = new ArrayList(); byte[] bytes = getBytes(); maxShapeId = IntegerHelper.getInt (bytes[0], bytes[1], bytes[2], bytes[3]); numClusters = IntegerHelper.getInt (bytes[4], bytes[5], bytes[6], bytes[7]); shapesSaved = IntegerHelper.getInt (bytes[8], bytes[9], bytes[10], bytes[11]); drawingsSaved = IntegerHelper.getInt (bytes[12], bytes[13], bytes[14], bytes[15]); int pos = 16; for (int i = 0; i < numClusters; i++) { int dgId = IntegerHelper.getInt(bytes[pos], bytes[pos + 1]); int sids = IntegerHelper.getInt(bytes[pos + 2], bytes[pos + 3]); Cluster c = new Cluster(dgId, sids); clusters.add(c); pos += 4; } }
/** * Constructor * * @param erd the read in data */ public Dgg(EscherRecordData erd) { super(erd); clusters = new ArrayList(); byte[] bytes = getBytes(); maxShapeId = IntegerHelper.getInt (bytes[0], bytes[1], bytes[2], bytes[3]); numClusters = IntegerHelper.getInt (bytes[4], bytes[5], bytes[6], bytes[7]); shapesSaved = IntegerHelper.getInt (bytes[8], bytes[9], bytes[10], bytes[11]); drawingsSaved = IntegerHelper.getInt (bytes[12], bytes[13], bytes[14], bytes[15]); int pos = 16; for (int i = 0; i < numClusters; i++) { int dgId = IntegerHelper.getInt(bytes[pos], bytes[pos + 1]); int sids = IntegerHelper.getInt(bytes[pos + 2], bytes[pos + 3]); Cluster c = new Cluster(dgId, sids); clusters.add(c); pos += 4; } }
/** * Adds a cluster to this record * * @param dgid the id * @param sids the sid */ void addCluster(int dgid, int sids) { Cluster c = new Cluster(dgid, sids); clusters.add(c); }