android.net
public
static
final
class
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:
://?#
Relative URI references (which are always hierarchical) follow one
of two patterns: ?#
or //?#
An opaque URI follows this pattern:
:#
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
Uri.Builder()
Constructs a new Builder.
Public Methods
public
Uri.Builder
appendEncodedPath(String newSegment)
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.
Parameters
key
| which will be encoded |
value
| which will be encoded
|
Encodes and sets the authority.
public
Uri
build()
Constructs a Uri with the current attributes.
public
Uri.Builder
encodedAuthority(String authority)
Sets the previously encoded authority.
Sets the previously encoded fragment.
public
Uri.Builder
encodedOpaquePart(String opaquePart)
Sets the previously encoded opaque scheme-specific-part.
Parameters
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.
Parameters
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.
Parameters
scheme
| name or null if this is a relative Uri
|
public
String
toString()
Returns a string containing a concise, human-readable description of the
receiver.
Returns
- String a printable representation for the receiver.