Here you can find the source of getNode(String path)
Parameter | Description |
---|---|
path | The absolute path name of the node. |
public static Preferences getNode(String path)
//package com.java2s; //License from project: Open Source License import java.util.prefs.Preferences; import java.util.prefs.BackingStoreException; public class Main { /** Get node for package and path, return null if not already existing. @param path The absolute path name of the node. @return The node or null, if node does not exist or failure in the backing store. *///from w w w. j a v a 2 s. c o m public static Preferences getNode(String path) { assert !path.startsWith("/"); Preferences prefs = Preferences.userRoot(); try { if (!prefs.nodeExists(path)) return null; } catch (BackingStoreException e) { return null; } return prefs.node(path); } }