|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.net.Uri.Builder
public static final class Uri.Builder
Helper class for building or manipulating URI references. Not safe for concurrent use.
An absolute hierarchical URI reference follows the pattern:
<scheme>://<authority><absolute path>?<query>#<fragment>
Relative URI references (which are always hierarchical) follow one
of two patterns: <relative or absolute path>?<query>#<fragment>
or //<authority><absolute path>?<query>#<fragment>
An opaque URI follows this pattern:
<scheme>:<opaque part>#<fragment>
| Constructor Summary | |
|---|---|
Uri.Builder()
Constructs a new Builder. |
|
| Method Summary | |
|---|---|
Uri.Builder |
appendEncodedPath(String newSegment)
Appends the given segment to the path. |
Uri.Builder |
appendPath(String newSegment)
Encodes the given segment and appends it to the path. |
Uri.Builder |
appendQueryParameter(String key,
String value)
Encodes the key and value and then appends the parameter to the query string. |
Uri.Builder |
authority(String authority)
Encodes and sets the authority. |
(package private) Uri.Builder |
authority(Uri.Part authority)
|
Uri |
build()
Constructs a Uri with the current attributes. |
Uri.Builder |
encodedAuthority(String authority)
Sets the previously encoded authority. |
Uri.Builder |
encodedFragment(String fragment)
Sets the previously encoded fragment. |
Uri.Builder |
encodedOpaquePart(String opaquePart)
Sets the previously encoded opaque scheme-specific-part. |
Uri.Builder |
encodedPath(String path)
Sets the previously encoded path. |
Uri.Builder |
encodedQuery(String query)
Sets the previously encoded query. |
Uri.Builder |
fragment(String fragment)
Encodes and sets the fragment. |
(package private) Uri.Builder |
fragment(Uri.Part fragment)
|
Uri.Builder |
opaquePart(String opaquePart)
Encodes and sets the given opaque scheme-specific-part. |
(package private) Uri.Builder |
opaquePart(Uri.Part opaquePart)
|
Uri.Builder |
path(String path)
Sets the path. |
(package private) Uri.Builder |
path(Uri.PathPart path)
|
Uri.Builder |
query(String query)
Encodes and sets the query. |
(package private) Uri.Builder |
query(Uri.Part query)
|
Uri.Builder |
scheme(String scheme)
Sets the scheme. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Uri.Builder()
| Method Detail |
|---|
public Uri.Builder scheme(String scheme)
scheme - name or null if this is a relative UriUri.Builder opaquePart(Uri.Part opaquePart)
public Uri.Builder opaquePart(String opaquePart)
opaquePart - decoded opaque partpublic Uri.Builder encodedOpaquePart(String opaquePart)
opaquePart - encoded opaque partUri.Builder authority(Uri.Part authority)
public Uri.Builder authority(String authority)
public Uri.Builder encodedAuthority(String authority)
Uri.Builder path(Uri.PathPart path)
public Uri.Builder path(String path)
If the path is not null and doesn't start with a '/', and if you specify a scheme and/or authority, the builder will prepend the given path with a '/'.
public Uri.Builder encodedPath(String path)
If the path is not null and doesn't start with a '/', and if you specify a scheme and/or authority, the builder will prepend the given path with a '/'.
public Uri.Builder appendPath(String newSegment)
public Uri.Builder appendEncodedPath(String newSegment)
Uri.Builder query(Uri.Part query)
public Uri.Builder query(String query)
public Uri.Builder encodedQuery(String query)
Uri.Builder fragment(Uri.Part fragment)
public Uri.Builder fragment(String fragment)
public Uri.Builder encodedFragment(String fragment)
public Uri.Builder appendQueryParameter(String key,
String value)
key - which will be encodedvalue - which will be encodedpublic Uri build()
UnsupportedOperationException - if the URI is opaque and the
scheme is nullpublic String toString()
Object
toString in class Object
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||