/** * {@inheritDoc} */ public Class<?> findClass( String name ) throws ClassNotFoundException { byte[] classBytes = null; Value<?> value = attribute.get(); if ( value.isHumanReadable() ) { throw new ClassNotFoundException( I18n.err( I18n.ERR_10002 ) ); } classBytes = value.getBytes(); return defineClass( name, classBytes, 0, classBytes.length ); } }
/** * Return a String value, from teh given Valu, even if it's a binary value */ private String getStringValue( Attribute attribute ) { Value<?> value = attribute.get(); if ( value instanceof BinaryValue ) { // We have to transform the value to a String return Strings.utf8ToString( value.getBytes() ); } else { return value.getString(); } }
byte[] bytes = matchValue.getBytes(); int bytesLength = bytes.length; buffer.put( TLV.getBytes( bytesLength ) );
assertionValueLength = assertionValue.getBytes().length;
Value.encode( buffer, assertion.getAssertionValue().getBytes() );
Value.encode( buffer, value.getBytes() );
int bytesLength = matchValue.getBytes().length; extensibleMatchLength += 1 + TLV.getNbBytes( bytesLength ) + bytesLength;
org.apache.directory.shared.asn1.ber.tlv.Value.encode( buffer, value.getBytes() );
Value.encode( buffer, value.getBytes() );
.getAssertionValue().getBytes()) );
int valueLength = value.getBytes().length; localValuesLength += 1 + TLV.getNbBytes( valueLength ) + valueLength;
byte[] binaryValue = value.getBytes(); localValuesLength += 1 + TLV.getNbBytes( binaryValue.length ) + binaryValue.length;
byte[] value = getAssertionValue().getBytes(); avaLength += 1 + TLV.getNbBytes( value.length ) + value.length; setAttrValBytes( value );