# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# ContentUris

`public class ContentUris`
`extends Object` ``

java.lang.Object
↳ | android.content.ContentUris

Utility methods useful for working with `Uri` objects that use the "content" (content://) scheme.

Content URIs have the syntax

`content://authority/path/id`

`content:`
  The scheme portion of the URI. This is always set to `ContentResolver.SCHEME_CONTENT` (value `content://`).
authority
  A string that identifies the entire content provider. All the content URIs for the provider start with this string. To guarantee a unique authority, providers should consider using an authority that is the same as the provider class' package identifier.
path
  Zero or more segments, separated by a forward slash (`/`), that identify some subset of the provider's data. Most providers use the path part to identify individual tables. Individual segments in the path are often called "directories" although they do not refer to file directories. The right-most segment in a path is often called a "twig"
id
  A unique numeric identifier for a single row in the subset of data identified by the preceding path part. Most providers recognize content URIs that contain an id part and give them special handling. A table that contains a column named `_ID` often expects the id part to be a particular value for that column.

## Summary

### Public constructors
`ContentUris()`

### Public methods
`static Uri.Builder` | `appendId(Uri.Builder builder, long id)` Appends the given ID to the end of the path.
`static long` | `parseId(Uri contentUri)` Converts the last path segment to a long.
`static Uri` | `removeId(Uri contentUri)` Removes any ID from the end of the path.
`static Uri` | `withAppendedId(Uri contentUri, long id)` Appends the given ID to the end of the path.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### ContentUris

    public ContentUris ()

## Public methods

### appendId

    public static Uri.Builder appendId (Uri.Builder builder,
                    long id)

Appends the given ID to the end of the path.

Parameters
`builder` | `Uri.Builder`: to append the ID to This value cannot be `null`.
`id` | `long`: to append

Returns
`Uri.Builder` | the given builder This value cannot be `null`.

### parseId

    public static long parseId (Uri contentUri)

Converts the last path segment to a long.

This supports a common convention for content URIs where an ID is stored in the last segment.

Parameters
`contentUri` | `Uri`: This value cannot be `null`.

Returns
`long` | the long conversion of the last segment or -1 if the path is empty

Throws
`UnsupportedOperationException` | if this isn't a hierarchical URI
`NumberFormatException` | if the last segment isn't a number

### removeId

    public static Uri removeId (Uri contentUri)

Removes any ID from the end of the path.

Parameters
`contentUri` | `Uri`: that ends with an ID This value cannot be `null`.

Returns
`Uri` | a new URI with the ID removed from the end of the path This value cannot be `null`.

Throws
`IllegalArgumentException` | when the given URI has no ID to remove from the end of the path

### withAppendedId

    public static Uri withAppendedId (Uri contentUri,
                    long id)

Appends the given ID to the end of the path.

Parameters
`contentUri` | `Uri`: to start with This value cannot be `null`.
`id` | `long`: to append

Returns
`Uri` | a new URI with the given ID appended to the end of the path This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*