| Home >> All >> org >> jbossmx >> cluster >> watchdog >> [ util Javadoc ] |
Source code: org/jbossmx/cluster/watchdog/util/StringInitProperties.java
1 /** 2 * JBoss, the OpenSource EJB server 3 * 4 * Distributable under LGPL license Version 2.1, February 1999. 5 * See terms of license at gnu.org. 6 */ 7 8 package org.jbossmx.cluster.watchdog.util; 9 10 // Standard Java Packages 11 import java.io.ByteArrayInputStream; 12 import java.io.InputStream; 13 14 import java.util.Properties; 15 16 /** 17 * Properties class which can be initialised from a String, first used (via reflection) by 18 * RegisterActivatableObjects 19 */ 20 public class StringInitProperties 21 extends Properties 22 { 23 /** 24 */ 25 public StringInitProperties() 26 { 27 super(); 28 } 29 30 /** 31 * @param properties 32 */ 33 public StringInitProperties(Properties properties) 34 { 35 super(properties); 36 } 37 38 /** 39 * @param properties 40 * 41 * @throws Exception 42 */ 43 public StringInitProperties(final String properties) throws Exception 44 { 45 InputStream inputStream = new ByteArrayInputStream(properties.getBytes()); 46 load(inputStream); 47 inputStream.close(); 48 } 49 }