org.ungoverned.oscar.util
Class TextUtil

java.lang.Object
  extended byorg.ungoverned.oscar.util.TextUtil

public class TextUtil
extends java.lang.Object


Constructor Summary
TextUtil()
           
 
Method Summary
static java.lang.String[] parseCommaDelimitedString(java.lang.String value)
          Parses comma delimited string and returns an array containing the tokens.
static java.lang.Object[][] parseImportExportHeader(java.lang.String s)
          Parses the Import-Package or Export-Package manifest header.
static LibraryInfo[] parseLibraryStrings(java.lang.String[] libStrs)
          Parse native code from manifest.
static java.lang.Object[][] parsePackageStrings(java.lang.String[] packages)
          Parse package strings from manifest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextUtil

public TextUtil()
Method Detail

parseCommaDelimitedString

public static java.lang.String[] parseCommaDelimitedString(java.lang.String value)
Parses comma delimited string and returns an array containing the tokens.

Parameters:
value - the comma delimited string to parse.
Returns:
an array of string tokens or null if there were no tokens.

parsePackageStrings

public static java.lang.Object[][] parsePackageStrings(java.lang.String[] packages)
                                                throws java.lang.IllegalArgumentException
Parse package strings from manifest.

Throws:
java.lang.IllegalArgumentException

parseImportExportHeader

public static java.lang.Object[][] parseImportExportHeader(java.lang.String s)
                                                    throws BundleException
Parses the Import-Package or Export-Package manifest header. This routine will throw an exception if the passed in string value is an empty string, but a null value is acceptable.

Parameters:
s - the value of the import or export manifest header.
Returns:
an array of Object arrays, one for each parsed package, or an empty array if there are no packages. throws org.osgi.framework.BundleException if there is an error parsing the string.
Throws:
BundleException

parseLibraryStrings

public static LibraryInfo[] parseLibraryStrings(java.lang.String[] libStrs)
                                         throws java.lang.IllegalArgumentException
Parse native code from manifest.

Throws:
java.lang.IllegalArgumentException