org.infoglue.deliver.util
Class Support

java.lang.Object
  extended by org.infoglue.deliver.util.Support

public class Support
extends java.lang.Object

A support class for nice static methods whoch could be used every where.

Author:
Per Jonsson - per.jonsson@it-huset.se

Constructor Summary
Support()
           
 
Method Summary
static java.util.Map convertTextToMap(java.lang.String text)
          Converts a property like string to a map.
static java.util.Map convertTextToMap(java.lang.String text, java.lang.String propertyValueDelim, java.lang.String rowDelim)
          Converts a property like string to a map.
static java.util.Map convertTextToProperties(java.lang.String text)
          Converts (rather loads) an text String to a Properties object and returns it.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Support

public Support()
Method Detail

convertTextToMap

public static java.util.Map convertTextToMap(java.lang.String text)
Converts a property like string to a map. Where the rowdelmiter is "\n" and and property value delimiter is "="

Parameters:
text - the text to parse/convert
Returns:
a map with values or an empty map if none.

convertTextToMap

public static java.util.Map convertTextToMap(java.lang.String text,
                                             java.lang.String propertyValueDelim,
                                             java.lang.String rowDelim)
Converts a property like string to a map. Where the rowdelmiter and property value delimiter can be defined.

Parameters:
text - the text to parse/convert
propertyValueDelim - the delimiter between the property and value, ie "="
rowDelim - the row delimiter, normaly \n.
Returns:
a map with values or an empty map if none.

convertTextToProperties

public static java.util.Map convertTextToProperties(java.lang.String text)
Converts (rather loads) an text String to a Properties object and returns it.

Parameters:
text - the text to convert into a Properties / Map object
Returns:
an Map with key values or empty map if none found.

main

public static void main(java.lang.String[] args)
Parameters:
args -


Copyright © 2005 InfoGlue.org All Rights Reserved.