IT. Expert System.

Android Reference

ContentUris


android.content

Class ContentUris



  • public class ContentUris
    extends Object
    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.
    • Constructor Detail

      • ContentUris

        public ContentUris()
    • Method Detail

      • 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.

        Returns:
        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
      • appendId

        public static Uri.Builder appendId(Uri.Builder builder,
                           long id)
        Appends the given ID to the end of the path.
        Parameters:
        builder - to append the ID to
        id - to append
        Returns:
        the given builder
      • withAppendedId

        public static Uri withAppendedId(Uri contentUri,
                         long id)
        Appends the given ID to the end of the path.
        Parameters:
        contentUri - to start with
        id - to append
        Returns:
        a new URI with the given ID appended to the end of the path


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2513 / . Delta: 0.02927 с