java.lang.Object | |
↳ | android.net.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>
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Builder.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Appends the given segment to the path.
| |||||||||||
Encodes the given segment and appends it to the path.
| |||||||||||
Encodes the key and value and then appends the parameter to the
query string.
| |||||||||||
Encodes and sets the authority.
| |||||||||||
Constructs a Uri with the current attributes.
| |||||||||||
Sets the previously encoded authority.
| |||||||||||
Sets the previously encoded fragment.
| |||||||||||
Sets the previously encoded opaque scheme-specific-part.
| |||||||||||
Sets the previously encoded path.
| |||||||||||
Sets the previously encoded query.
| |||||||||||
Encodes and sets the fragment.
| |||||||||||
Encodes and sets the given opaque scheme-specific-part.
| |||||||||||
Sets the path.
| |||||||||||
Encodes and sets the query.
| |||||||||||
Sets the scheme.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Constructs a new Builder.
Appends the given segment to the path.
Encodes the given segment and appends it to the path.
Encodes the key and value and then appends the parameter to the query string.
key | which will be encoded |
---|---|
value | which will be encoded |
Encodes and sets the authority.
Constructs a Uri with the current attributes.
UnsupportedOperationException | if the URI is opaque and the scheme is null |
---|
Sets the previously encoded authority.
Sets the previously encoded fragment.
Sets the previously encoded opaque scheme-specific-part.
opaquePart | encoded opaque part |
---|
Sets the previously encoded 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 '/'.
Sets the previously encoded query.
Encodes and sets the fragment.
Encodes and sets the given opaque scheme-specific-part.
opaquePart | decoded opaque part |
---|
Sets the path. Leaves '/' characters intact but encodes others as necessary.
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 '/'.
Encodes and sets the query.
Sets the scheme.
scheme | name or null if this is a relative Uri
|
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's hashCode(), that is, it is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())