Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.aendvari.common.util
Class ConversionUtil  view ConversionUtil download ConversionUtil.java

java.lang.Object
  extended bycom.aendvari.common.util.ConversionUtil

public class ConversionUtil
extends java.lang.Object

Utility class for conversion functions.


Constructor Summary
ConversionUtil()
           
 
Method Summary
static java.lang.String dateToString(java.util.Date date, java.lang.String format)
          Converts the Date into a string form using the format provided.
static java.lang.String doubleQuotesToHtml(java.lang.String value)
          Converts all " into "
static boolean isValidDoubleValue(java.lang.String sDoubleString)
          Determines if the string value can be converted safely into a double.
static boolean isValidIntegerValue(java.lang.String sIntegerString)
          Determines if the string value can be converted safely into a integer.
static java.lang.String ltgt2HTML(java.lang.String sString)
          Converts all < or > to their HTML equivalent.
static java.lang.String nl2br(java.lang.String sString)
          Converts all \n to <BR>.
static java.util.Date stringToDateMMDDYYYY(java.lang.String dateString)
          Converts the Date into a string form using the format provided.
static java.util.Date stringToDateYYYYMMDD(java.lang.String dateString)
          Converts the Date into a string form using the format provided.
static double stringToDouble(java.lang.String sDoubleString)
          Converts a string into a double.
static int stringToInt(java.lang.String sIntegerString)
          Converts a string into a integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionUtil

public ConversionUtil()
Method Detail

stringToInt

public static int stringToInt(java.lang.String sIntegerString)
Converts a string into a integer.


isValidIntegerValue

public static boolean isValidIntegerValue(java.lang.String sIntegerString)
Determines if the string value can be converted safely into a integer.


stringToDouble

public static double stringToDouble(java.lang.String sDoubleString)
Converts a string into a double.


isValidDoubleValue

public static boolean isValidDoubleValue(java.lang.String sDoubleString)
Determines if the string value can be converted safely into a double.


nl2br

public static java.lang.String nl2br(java.lang.String sString)
Converts all \n to <BR>. This method leaves the original string alone and creates a new string to return instead.


ltgt2HTML

public static java.lang.String ltgt2HTML(java.lang.String sString)
Converts all < or > to their HTML equivalent. This method leaves the original string alone and creates a new string to return instead.


doubleQuotesToHtml

public static java.lang.String doubleQuotesToHtml(java.lang.String value)
Converts all " into "


dateToString

public static java.lang.String dateToString(java.util.Date date,
                                            java.lang.String format)
Converts the Date into a string form using the format provided. See SimpleDateFormat for format options.


stringToDateMMDDYYYY

public static java.util.Date stringToDateMMDDYYYY(java.lang.String dateString)
                                           throws java.text.ParseException
Converts the Date into a string form using the format provided. See SimpleDateFormat for format options.


stringToDateYYYYMMDD

public static java.util.Date stringToDateYYYYMMDD(java.lang.String dateString)
                                           throws java.text.ParseException
Converts the Date into a string form using the format provided. See SimpleDateFormat for format options.