static String[] decodeUserPassword(final String userPasswordValue) throws DecodeException {
  if (userPasswordValue == null || userPasswordValue.length() == 0) {
    final LocalizableMessage message=ERR_ATTR_SYNTAX_USERPW_NO_VALUE.get();
    throw DecodeException.error(message);
  }
  if (userPasswordValue.charAt(0) != '{') {
    final LocalizableMessage message=ERR_ATTR_SYNTAX_USERPW_NO_OPENING_BRACE.get();
    throw DecodeException.error(message);
  }
  final int closePos=userPasswordValue.indexOf('}');
  if (closePos < 0) {
    final LocalizableMessage message=ERR_ATTR_SYNTAX_USERPW_NO_CLOSING_BRACE.get();
    throw DecodeException.error(message);
  }
  final String schemeName=userPasswordValue.substring(1,closePos);
  final String encodedValue=userPasswordValue.substring(closePos + 1);
  if (schemeName.length() == 0) {
    final LocalizableMessage message=ERR_ATTR_SYNTAX_USERPW_NO_SCHEME.get();
    throw DecodeException.error(message);
  }
  return new String[]{toLowerCase(schemeName),encodedValue};
}

static String [ ] decodeUserPassword ( final String userPasswordValue ) throws DecodeException { if ( userPasswordValue == null || userPasswordValue . length ( ) == 0 ) { final LocalizableMessage message = ERR_ATTR_SYNTAX_USERPW_NO_VALUE . get ( ) ; throw DecodeException . error ( message ) ; } if ( userPasswordValue . charAt ( 0 ) != '{' ) { final LocalizableMessage message = ERR_ATTR_SYNTAX_USERPW_NO_OPENING_BRACE . get ( ) ; throw DecodeException . error ( message ) ; } final int closePos = userPasswordValue . indexOf ( '}' ) ; if ( closePos < 0 ) { final LocalizableMessage message = ERR_ATTR_SYNTAX_USERPW_NO_CLOSING_BRACE . get ( ) ; throw DecodeException . error ( message ) ; } final String schemeName = userPasswordValue . substring ( 1 , closePos ) ; final String encodedValue = userPasswordValue . substring ( closePos + 1 ) ; if ( schemeName . length ( ) == 0 ) { final LocalizableMessage message = ERR_ATTR_SYNTAX_USERPW_NO_SCHEME . get ( ) ; throw DecodeException . error ( message ) ; } return new String [ ] { toLowerCase ( schemeName ) , encodedValue } ; }
decodes the provided user password value into its component parts .
