1 | public void setQueryString(String p_queryString) throws MalformedURIException {↵ | | 1 | public void setFragment(String p_fragment) throws MalformedURIException {↵
|
2 | if (p_queryString == null) {↵ | | 2 | if (p_fragment == null) {↵
|
3 | m_queryString = null;↵ | | 3 | m_fragment = null;↵
|
4 | }↵ | | 4 | }↵
|
5 | else if (!isGenericURI()) {↵ | | 5 | else if (!isGenericURI()) {↵
|
6 | throw new MalformedURIException(↵ | | 6 | throw new MalformedURIException(↵
|
7 | "Query string can only be set for a generic URI!");↵ | | 7 | "Fragment can only be set for a generic URI!");↵
|
8 | }↵ | | 8 | }↵
|
9 | else if (getPath() == null) {↵ | | 9 | else if (getPath() == null) {↵
|
10 | throw new MalformedURIException(↵ | | 10 | throw new MalformedURIException(↵
|
11 | "Query string cannot be set when path is null!");↵ | | 11 | "Fragment cannot be set when path is null!");↵
|
12 | }↵ | | 12 | }↵
|
13 | else if (!isURIString(p_queryString)) {↵ | | 13 | else if (!isURIString(p_fragment)) {↵
|
14 | throw new MalformedURIException(↵ | | 14 | throw new MalformedURIException(↵
|
15 | "Query string contains invalid character!");↵ | | 15 | "Fragment contains invalid character!");↵
|
16 | }↵ | | 16 | }↵
|
17 | else {↵ | | 17 | else {↵
|
18 | m_queryString = p_queryString;↵ | | 18 | m_fragment = p_fragment;↵
|
19 | | | 19 |
|