Java.Util.Prefs.Preferences.ImportPreferences Method
Imports all the preferences from an XML document using the given input stream.

Syntax

[Android.Runtime.Register("importPreferences", "(Ljava/io/InputStream;)V", "")]
public static void ImportPreferences (System.IO.Stream istream)

Parameters

istream
the input stream to read the data from.

Exceptions

TypeReason
Java.Util.Prefs.InvalidPreferencesFormatExceptionif the data read from the given input stream is not from a valid XML document.
Java.IO.IOExceptionif an error occurs while importing.

Remarks

Imports all the preferences from an XML document using the given input stream.

This XML document uses the UTF-8 encoding and must be written according to the DTD in its DOCTYPE declaration, which must be the following:

xml Example

 <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
 
Please note that (unlike the methods of this class that don't concern serialization), this call is not thread-safe.

[Android Documentation]

Requirements

Namespace: Java.Util.Prefs
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1