com.biocomfort.Utils
Class FormatHelper

java.lang.Object
  extended by com.biocomfort.Utils.FormatHelper

public class FormatHelper
extends java.lang.Object

The class FormatHelper offers static methods to convert data structures in String objects.


Constructor Summary
FormatHelper()
           
 
Method Summary
static java.lang.String booleanArraytoString(boolean[] booleans, java.lang.String separator)
          Converts the given boolean array to a String object of custom separated representations of each boolean value.
static java.lang.String BooleanToBit(boolean value)
          Converts the given boolean value to a String object, whereby '1' represents the boolean value true and '0' represents false.
static java.lang.String shortArrayToHexString(short[] data, java.lang.String separator)
          Converts the given short array to a String object of custom separated hexadecimal representations of each short value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatHelper

public FormatHelper()
Method Detail

shortArrayToHexString

public static final java.lang.String shortArrayToHexString(short[] data,
                                                           java.lang.String separator)
Converts the given short array to a String object of custom separated hexadecimal representations of each short value.

Parameters:
data - the short array to convert
separator - the separator string that is inserted between each two short representations
Returns:
a hexadecimal string representation of a short array

booleanArraytoString

public static java.lang.String booleanArraytoString(boolean[] booleans,
                                                    java.lang.String separator)
Converts the given boolean array to a String object of custom separated representations of each boolean value. The String '1' represents the boolean value true and the String '0' represents the value false.

Parameters:
booleans - the boolean array to convert
separator - the separator string that is inserted between each two boolean representations.
Returns:
a string representation of a boolean array

BooleanToBit

public static java.lang.String BooleanToBit(boolean value)
Converts the given boolean value to a String object, whereby '1' represents the boolean value true and '0' represents false.

Parameters:
value - the boolean value to convert
Returns:
a string representation of a boolean value