public static Map < String , Object > convertTextToDataMap ( String text ) throws IOException { Map < String , Object > dataMap = null ; Properties p = new Properties ( ) ; p . load ( new StringReader ( text ) ) ; dataMap = new HashMap < String , Object > ( ) ; for ( Entry < Object , Object > entry : p . entrySet ( ) ) { dataMap . put ( ( String ) entry . getKey ( ) , entry . getValue ( ) ) ; } return dataMap ; }
Convert a text in properties file format to DataMap that can be used by Quartz