/** * Adds an object to <code>this</code> object's list of attribute values * * @param bytes Ultimately all of this attribute's values are treated * as binary data so we simplify the process by requiring * that all data added to our list is in binary form. * * <P> Note: If attrBytes represents a string it should be UTF-8 encoded. */ private void add( byte[] bytes ) { if( null == this.values ) { this.values = new Object[]{ bytes }; } else { // Duplicate attribute values not allowed for( int i = 0; i < this.values.length; i++ ) { if( equals( bytes, (byte[])this.values[i] ) ) { return; // Duplicate, don't add } } Object[] tmp = new Object[ this.values.length + 1 ]; System.arraycopy( this.values, 0, tmp, 0, this.values.length ); tmp[ this.values.length ] = bytes; this.values = tmp; tmp = null; } return; }
if( equals( attrBytes, (byte[])this.values[ i ] ) ) { if( 0 == i && 1 == this.values.length ) {