Creates an opaque Uri from the given components. Encodes the ssp which means this method cannot be used to create hierarchical URIs. @param scheme of the URI @param ssp scheme-specific-part, everything between the scheme separator (':') and the fragment separator ('#'), which will get encoded @pa
(String scheme, String ssp,
String fragment)
| 806 | * @see Builder if you don't want the ssp and fragment to be encoded |
| 807 | */ |
| 808 | public static Uri fromParts(String scheme, String ssp, |
| 809 | String fragment) { |
| 810 | if (scheme == null) { |
| 811 | throw new NullPointerException("scheme"); |
| 812 | } |
| 813 | if (ssp == null) { |
| 814 | throw new NullPointerException("ssp"); |
| 815 | } |
| 816 | |
| 817 | return new OpaqueUri(scheme, Part.fromDecoded(ssp), |
| 818 | Part.fromDecoded(fragment)); |
| 819 | } |
| 820 | |
| 821 | /** |
| 822 | * Opaque URI. |