|
|
@ -591,15 +591,14 @@ public class URIish implements Serializable { |
|
|
|
* @return the URI, including its password field, if any. |
|
|
|
* @return the URI, including its password field, if any. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String toPrivateString() { |
|
|
|
public String toPrivateString() { |
|
|
|
return format(true, false, false); |
|
|
|
return format(true, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return format(false, false, false); |
|
|
|
return format(false, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String format(final boolean includePassword, boolean escape, |
|
|
|
private String format(final boolean includePassword, boolean escapeNonAscii) { |
|
|
|
boolean escapeNonAscii) { |
|
|
|
|
|
|
|
final StringBuilder r = new StringBuilder(); |
|
|
|
final StringBuilder r = new StringBuilder(); |
|
|
|
if (getScheme() != null) { |
|
|
|
if (getScheme() != null) { |
|
|
|
r.append(getScheme()); |
|
|
|
r.append(getScheme()); |
|
|
@ -646,7 +645,7 @@ public class URIish implements Serializable { |
|
|
|
* @return the URI as an ASCII string. Password is not included. |
|
|
|
* @return the URI as an ASCII string. Password is not included. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String toASCIIString() { |
|
|
|
public String toASCIIString() { |
|
|
|
return format(false, true, true); |
|
|
|
return format(false, true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -654,7 +653,7 @@ public class URIish implements Serializable { |
|
|
|
* such that it will be valid for use over the network. |
|
|
|
* such that it will be valid for use over the network. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String toPrivateASCIIString() { |
|
|
|
public String toPrivateASCIIString() { |
|
|
|
return format(true, true, true); |
|
|
|
return format(true, true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|