/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }
/** * Copy an entire Attributes object. * * <p>It may be more efficient to reuse an existing object * rather than constantly allocating new ones.</p> * * @param atts The attributes to copy. */ public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); data[i*5+2] = atts.getQName(i); data[i*5+3] = atts.getType(i); data[i*5+4] = atts.getValue(i); } }