|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.SdkStats
public class SdkStats
Retrieves stats on platforms.
This returns information stored on the repository in a different XML file and isn't directly tied to the existence of the listed platforms.
| Nested Class Summary | |
|---|---|
static class |
SdkStats.PlatformStat
|
static class |
SdkStats.PlatformStatBase
|
| Constructor Summary | |
|---|---|
SdkStats()
|
|
| Method Summary | |
|---|---|
protected org.w3c.dom.Document |
getDocument(java.io.InputStream xml,
ITaskMonitor monitor)
Takes an XML document as a string as parameter and returns a DOM for it. |
SparseArray<SdkStats.PlatformStat> |
getStats()
|
protected int |
getXmlSchemaVersion(java.io.InputStream xml)
Manually parses the root element of the XML to extract the schema version at the end of the xmlns:sdk="http://schemas.android.com/sdk/android/addons-list/$N" declaration. |
void |
load(DownloadCache cache,
boolean forceHttp,
ITaskMonitor monitor)
|
protected SparseArray<SdkStats.PlatformStat> |
parseStatsDocument(org.w3c.dom.Document doc,
java.lang.String nsUri,
ITaskMonitor monitor)
Parses all valid platforms found in the XML. |
protected java.lang.String |
validateXml(java.io.InputStream xml,
java.lang.String url,
int version,
java.lang.String[] outError,
java.lang.Boolean[] validatorFound)
Validates this XML against one of the requested SDK Repository schemas. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SdkStats()
| Method Detail |
|---|
public SparseArray<SdkStats.PlatformStat> getStats()
public void load(DownloadCache cache,
boolean forceHttp,
ITaskMonitor monitor)
protected int getXmlSchemaVersion(java.io.InputStream xml)
SdkStatsConstants.NS_LATEST_VERSION for a valid schema version
or 0 if no schema could be found.
protected java.lang.String validateXml(java.io.InputStream xml,
java.lang.String url,
int version,
java.lang.String[] outError,
java.lang.Boolean[] validatorFound)
protected org.w3c.dom.Document getDocument(java.io.InputStream xml,
ITaskMonitor monitor)
protected SparseArray<SdkStats.PlatformStat> parseStatsDocument(org.w3c.dom.Document doc,
java.lang.String nsUri,
ITaskMonitor monitor)
getStats()
(also returns the value directly, useful for unit tests.)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||