public class ContentProviderURIParamsExtractor extends Object
Extracts from an content provider URI, its path segments, after check that URI has right lenght, just to prevent URI manipulation. An example of URI is:
content://androi.authority/masters/${master}/details/${detail}/subdetails/${subdetail}
With param value:
content://androi.authority/masters/1/details/2/subdetails/3
Path segment index start from 0, so index of parameters are:
| Constructor and Description |
|---|
ContentProviderURIParamsExtractor(String uri,
int expectedPathSegments)
Split an URI and check its size in terms of segment path.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPathSegment(int segmentIndex)
Extract a specific segment by its index.
|
public ContentProviderURIParamsExtractor(String uri, int expectedPathSegments)
Split an URI and check its size in terms of segment path.
uri - expectedPathSegments - public String getPathSegment(int segmentIndex)
Extract a specific segment by its index.
Path segment index start from 0.
segmentIndex - Copyright © 2018. All rights reserved.