/** * Indicates if the value needs to be encoded as Base64 * * @param value * the value to check * @return * true if the value needs to be encoded as Base64 */ public static boolean needsBase64Encoding( Object value ) { if ( value instanceof byte[] ) { return true; } else if ( value instanceof String ) { return !LdifUtils.isLDIFSafe( ( String ) value ); } return true; }
/** * Indicates if the value needs to be encoded as Base64 * * @param value * the value to check * @return * true if the value needs to be encoded as Base64 */ public static boolean needsBase64Encoding( Object value ) { if ( value instanceof byte[] ) { return true; } else if ( value instanceof String ) { return !LdifUtils.isLDIFSafe( ( String ) value ); } return true; }
if ( !LdifUtils.isLDIFSafe( str ) )
if ( isLDIFSafe( entry.getDn().getName() ) )
if ( isLDIFSafe( entry.getDn().getName() ) )