/** * Get the escaped user * * @return the escaped user */ public String getEscapedUser() { char[] user = getRawUser(); return (user == null) ? null : new String(user); }
/** * Get the user. * * @return the user name * @throws URIException If {@link #decode} fails */ public String getUser() throws URIException { char[] user = getRawUser(); return (user == null) ? null : decode(user, getProtocolCharset()); }
/** * Set the raw-escaped password. * * @param escapedPassword the raw-escaped password; could be null * @throws URIException escaped password not valid or username missed */ public void setRawPassword(char[] escapedPassword) throws URIException { if (escapedPassword != null && !validate(escapedPassword, within_userinfo)) { throw new URIException(URIException.ESCAPING, "escaped password not valid"); } if (getRawUser() == null || getRawUser().length == 0) { throw new URIException(URIException.PARSING, "username required"); } String username = new String(getRawUser()); String password = escapedPassword == null ? null : new String(escapedPassword); // an emtpy string is allowed as a password String userinfo = username + ((password == null) ? "" : ":" + password); String hostname = new String(getRawHost()); String hostport = (_port == -1) ? hostname : hostname + ":" + _port; String authority = userinfo + "@" + hostport; _userinfo = userinfo.toCharArray(); _authority = authority.toCharArray(); setURI(); }
/** * Get the escaped user * * @return the escaped user */ public String getEscapedUser() { char[] user = getRawUser(); return (user == null) ? null : new String(user); }
/** * Get the escaped user * * @return the escaped user */ public String getEscapedUser() { char[] user = getRawUser(); return (user == null) ? null : new String(user); }
/** * Get the escaped user * * @return the escaped user */ public String getEscapedUser() { char[] user = getRawUser(); return (user == null) ? null : new String(user); }
/** * Get the escaped user * * @return the escaped user */ public String getEscapedUser() { char[] user = getRawUser(); return (user == null) ? null : new String(user); }
/** * Get the user. * * @return the user name * @throws URIException If {@link #decode} fails */ public String getUser() throws URIException { char[] user = getRawUser(); return (user == null) ? null : decode(user, getProtocolCharset()); }
/** * Get the user. * * @return the user name * @throws URIException If {@link #decode} fails */ public String getUser() throws URIException { char[] user = getRawUser(); return (user == null) ? null : decode(user, getProtocolCharset()); }
/** * Get the user. * * @return the user name * @throws URIException If {@link #decode} fails */ public String getUser() throws URIException { char[] user = getRawUser(); return (user == null) ? null : decode(user, getProtocolCharset()); }
/** * Get the user. * * @return the user name * @throws URIException If {@link #decode} fails */ public String getUser() throws URIException { char[] user = getRawUser(); return (user == null) ? null : decode(user, getProtocolCharset()); }
/** * Set the raw-escaped password. * * @param escapedPassword the raw-escaped password; could be null * @throws URIException escaped password not valid or username missed */ public void setRawPassword(char[] escapedPassword) throws URIException { if (escapedPassword != null && !validate(escapedPassword, within_userinfo)) { throw new URIException(URIException.ESCAPING, "escaped password not valid"); } if (getRawUser() == null || getRawUser().length == 0) { throw new URIException(URIException.PARSING, "username required"); } String username = new String(getRawUser()); String password = escapedPassword == null ? null : new String(escapedPassword); // an emtpy string is allowed as a password String userinfo = username + ((password == null) ? "" : ":" + password); String hostname = new String(getRawHost()); String hostport = (_port == -1) ? hostname : hostname + ":" + _port; String authority = userinfo + "@" + hostport; _userinfo = userinfo.toCharArray(); _authority = authority.toCharArray(); setURI(); }
/** * Set the raw-escaped password. * * @param escapedPassword the raw-escaped password; could be null * @throws URIException escaped password not valid or username missed */ public void setRawPassword(char[] escapedPassword) throws URIException { if (escapedPassword != null && !validate(escapedPassword, within_userinfo)) { throw new URIException(URIException.ESCAPING, "escaped password not valid"); } if (getRawUser() == null || getRawUser().length == 0) { throw new URIException(URIException.PARSING, "username required"); } String username = new String(getRawUser()); String password = escapedPassword == null ? null : new String(escapedPassword); // an emtpy string is allowed as a password String userinfo = username + ((password == null) ? "" : ":" + password); String hostname = new String(getRawHost()); String hostport = (_port == -1) ? hostname : hostname + ":" + _port; String authority = userinfo + "@" + hostport; _userinfo = userinfo.toCharArray(); _authority = authority.toCharArray(); setURI(); }
/** * Set the raw-escaped password. * * @param escapedPassword the raw-escaped password; could be null * @throws URIException escaped password not valid or username missed */ public void setRawPassword(char[] escapedPassword) throws URIException { if (escapedPassword != null && !validate(escapedPassword, within_userinfo)) { throw new URIException(URIException.ESCAPING, "escaped password not valid"); } if (getRawUser() == null || getRawUser().length == 0) { throw new URIException(URIException.PARSING, "username required"); } String username = new String(getRawUser()); String password = escapedPassword == null ? null : new String(escapedPassword); // an emtpy string is allowed as a password String userinfo = username + ((password == null) ? "" : ":" + password); String hostname = new String(getRawHost()); String hostport = (_port == -1) ? hostname : hostname + ":" + _port; String authority = userinfo + "@" + hostport; _userinfo = userinfo.toCharArray(); _authority = authority.toCharArray(); setURI(); }
/** * Set the raw-escaped password. * * @param escapedPassword the raw-escaped password; could be null * @throws URIException escaped password not valid or username missed */ public void setRawPassword(char[] escapedPassword) throws URIException { if (escapedPassword != null && !validate(escapedPassword, within_userinfo)) { throw new URIException(URIException.ESCAPING, "escaped password not valid"); } if (getRawUser() == null || getRawUser().length == 0) { throw new URIException(URIException.PARSING, "username required"); } String username = new String(getRawUser()); String password = escapedPassword == null ? null : new String(escapedPassword); // an emtpy string is allowed as a password String userinfo = username + ((password == null) ? "" : ":" + password); String hostname = new String(getRawHost()); String hostport = (_port == -1) ? hostname : hostname + ":" + _port; String authority = userinfo + "@" + hostport; _userinfo = userinfo.toCharArray(); _authority = authority.toCharArray(); setURI(); }