English | Site Directory

Android - An Open Handset Alliance Project

android.os
public class

android.os.SystemProperties

java.lang.Object
android.os.SystemProperties

Gives access to the system properties store. The system properties store contains a list of string key-value pairs.

Summary

Public Constructors

          SystemProperties()

Public Methods

      static  String  get(String key)
Get the value for the given key.
      static  String  get(String key, String def)
Get the value for the given key.
      static  void  set(String key, String val)
Set the value for the given key.
Methods inherited from class java.lang.Object

Details

Public Constructors

public SystemProperties()

Public Methods

public static String get(String key)

Get the value for the given key.

Returns

  • an empty string if the key isn't found

Throws

IllegalArgumentException if the key exceeds 32 characters

public static String get(String key, String def)

Get the value for the given key.

Returns

  • if the key isn't found, return def if it isn't null, or an empty string otherwise

Throws

IllegalArgumentException if the key exceeds 32 characters

public static void set(String key, String val)

Set the value for the given key.

Throws

IllegalArgumentException if the key exceeds 32 characters
IllegalArgumentException if the value exceeds 92 characters
Build m5-rc15g - 14 May 2008 12:50