@Override public UriBuilder uri(URI uri) throws IllegalArgumentException { setUriParts(uri); return this; }
@Override public UriBuilder uri(URI uri) throws IllegalArgumentException { setUriParts(uri); return this; }
/** * Creates builder initialized with given URI. * * @param uri initial value for builder * @throws IllegalArgumentException when uri is null */ public UriBuilderImpl(URI uri) throws IllegalArgumentException { setUriParts(uri); }
/** * Creates builder initialized with given URI. * * @param uri initial value for builder * @throws IllegalArgumentException when uri is null */ public UriBuilderImpl(URI uri) throws IllegalArgumentException { setUriParts(uri); }
@Override public UriBuilder schemeSpecificPart(String ssp) throws IllegalArgumentException { // scheme-specific part is whatever after ":" of URI // see: http://en.wikipedia.org/wiki/URI_scheme try { if (scheme == null) { scheme = "http"; } URI uri = new URI(scheme, ssp, fragment); setUriParts(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException("Wrong syntax of scheme-specific part", e); } return this; }
@Override public UriBuilder schemeSpecificPart(String ssp) throws IllegalArgumentException { // scheme-specific part is whatever after ":" of URI // see: http://en.wikipedia.org/wiki/URI_scheme try { if (scheme == null) { scheme = "http"; } URI uri = new URI(scheme, ssp, fragment); setUriParts(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException("Wrong syntax of scheme-specific part", e); } return this; }
setUriParts(URI.create(pathEncoded));