/** * Returns a clone of this object. * * @return a clone of this object * * @see <a href="../../../../api/com/novell/ldap/LDAPControl.html#clone()">com.novell.ldap.LDAPControl.clone()</a> */ public Object clone() { return super.clone(); }
/** * Sets a single control to be sent to the server. * * @param control A single control to be sent to the server or * null if none. */ public void setControls(LDAPControl control) { if( control == null) { this.controls = null; return; } this.controls = new LDAPControl[1]; this.controls[0] = (LDAPControl)control.clone(); return; }
/** * Sets controls to be sent to the server. * * @param controls An array of controls to be sent to the server or * null if none. */ public void setControls(LDAPControl[] controls) { if( (controls == null) || (controls.length == 0)) { this.controls = null; return; } this.controls = new LDAPControl[controls.length]; for( int i=0; i<controls.length; i++) { this.controls[i] = (LDAPControl)controls[i].clone(); } return; }
clonedControl[i] = (LDAPControl) (responseCtls[i]).clone();
newClone.responseCtls = new LDAPControl[responseCtls.length]; for(int i=0; i < responseCtls.length; i++){ newClone.responseCtls[i] = (LDAPControl)responseCtls[i].clone();