Here you can find the source of loadPropertiesFromString(String propertiesString)
Parameter | Description |
---|---|
propertiesString | String containing properties to read. |
Parameter | Description |
---|---|
IOException | if properties cannot be read from string. |
public static Properties loadPropertiesFromString(String propertiesString) throws IOException
//package com.java2s; /* Please see the license information at the end of this file. */ import java.io.*; import java.util.*; public class Main { /** Load properties from a string. */*from www . j a va 2s . co m*/ * @param propertiesString String containing properties to read. * * @return Properties object with keys and values as read from * properties string. * * @throws IOException if properties cannot be read from string. */ public static Properties loadPropertiesFromString(String propertiesString) throws IOException { Properties properties = new Properties(); properties.load(new ByteArrayInputStream(propertiesString.getBytes("ISO-8859-1"))); return properties; } }