Java Code Examples for java.util.Properties.toString()

The following are Jave code examples for showing how to use toString() of the java.util.Properties class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: incubator-netbeans   File: PropertiesEditor.java   View Source Code Vote up 6 votes
@Override
public String getAsText() {
    Properties value = (Properties) getValue();
    if (value == null || value.isEmpty()) {
        return NbBundle.getMessage(PropertiesEditor.class,
                "NoPropertiesSet");                                 //NOI18N
    } else {
        return value.toString();
    }
}
 
Example 2
Project: LuaViewPlayground   File: PropUtil.java   View Source Code Vote up 5 votes
@TargetApi(9)
public static String toArray(Properties properties) {
    if (properties != null && properties.size() > 0) {
        String[] result = new String[properties.size()];
        int index = 0;
        properties.toString();

        String key;
        for (Iterator i$ = properties.stringPropertyNames().iterator(); i$.hasNext(); result[index++] = key + properties.getProperty(key)) {
            key = (String) i$.next();
        }
    }

    return null;
}