com.ibm.commerce.datatype

Class DataHelper

  • java.lang.Object
    • com.ibm.commerce.datatype.DataHelper


  • public class DataHelper
    extends java.lang.Object
    This class contains static methods for data conversion.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DataHelper()
      This is the default constructor for this class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String arrayToString(java.lang.String[] array, java.lang.String sep)
      This method converts an array of String objects ("tokens") to one String object, delimiting the tokens using a given separator.
      static java.lang.String[] stringToArray(java.lang.String value, java.lang.String sep)
      This method converts a String object to an array of String objects.
      static java.lang.String stringToHexString(java.lang.String iString)
      This method converts a Stringobject representing a number in decimal format to a String object representing a number in hexadecimal format.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataHelper

        public DataHelper()
        This is the default constructor for this class. It calls the constructor from the superclass.
    • Method Detail

      • arrayToString

        public static java.lang.String arrayToString(java.lang.String[] array,
                                                     java.lang.String sep)
        This method converts an array of String objects ("tokens") to one String object, delimiting the tokens using a given separator.
        Parameters:
        array - An array of String objects.
        seperator - A token separator.
        Returns:
        A String representation of the specified array with each element separated by the given separator.
      • stringToArray

        public static java.lang.String[] stringToArray(java.lang.String value,
                                                       java.lang.String sep)
        This method converts a String object to an array of String objects. The array is made up of the tokens of the original String object that are delimited by the given separator.
        Parameters:
        value - The String object to be converted to an array.
        separator - The token separator.
        Returns:
        An array of String objects.
      • stringToHexString

        public static java.lang.String stringToHexString(java.lang.String iString)
        This method converts a Stringobject representing a number in decimal format to a String object representing a number in hexadecimal format.
        Parameters:
        value - A a String representation of a number in decimal format.
        Returns:
        A String representation of a the hexadecimal value of the given number.