/** * {@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 ) );
/** * Create a list of string from a multivalued attribute's values */ private List<String> getStrings( Attribute attr ) { if ( attr == null ) { return EMPTY_LIST; } List<String> strings = new ArrayList<String>( attr.size() ); for ( Value<?> value : attr ) { strings.add( value.getString() ); } return strings; }
assertionValueLength = assertionValue.getBytes().length;
depsSet.add( value.getString() );
int bytesLength = matchValue.getBytes().length; extensibleMatchLength += 1 + TLV.getNbBytes( bytesLength ) + bytesLength;
values.add( name.getString() );
.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;