openfuture.bugbase.app.view
Class StringUtility

java.lang.Object
  |
  +--openfuture.bugbase.app.view.StringUtility

public class StringUtility
extends java.lang.Object

String Utility.

Created: Sat Feb 05 20:10:01 2000

Version:
$Revision: 1.3 $
Author:
Wolfgang Reissenberger

Constructor Summary
StringUtility()
           
 
Method Summary
static java.lang.String dateToString(java.util.Date date)
          Describe dateToString method here.
static java.lang.String dateToTimestamp(java.util.Date date)
          Converts a date into a timestamp string.
static java.lang.String escapeChar(java.lang.String s, char critical, char escapeChar)
          Escape all occurrences of critical with the given escape character.
static java.lang.String removeEscapes(java.lang.String s, char escapeChar)
          Remove all occurrences of escape characters.
static java.util.Date stringToDate(java.lang.String s)
          Parses a Date from a String.
static java.util.Date timestampToDate(java.lang.String s)
          Converts the string representation of a date into a Date object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtility

public StringUtility()
Method Detail

dateToString

public static java.lang.String dateToString(java.util.Date date)
Describe dateToString method here.
Parameters:
date - a Date value
Returns:
a String value

stringToDate

public static java.util.Date stringToDate(java.lang.String s)
                                   throws java.text.ParseException
Parses a Date from a String.

Parameters:
s - String containing a date entry
Returns:
a date object
Throws:
java.text.ParseException - if an error occurs

dateToTimestamp

public static java.lang.String dateToTimestamp(java.util.Date date)
Converts a date into a timestamp string.
Parameters:
date - the original date
Returns:
string representation

timestampToDate

public static java.util.Date timestampToDate(java.lang.String s)
Converts the string representation of a date into a Date object.
Parameters:
s - a String value
Returns:
a Date value

escapeChar

public static java.lang.String escapeChar(java.lang.String s,
                                          char critical,
                                          char escapeChar)
Escape all occurrences of critical with the given escape character.
Parameters:
s - original string
critical - character to be escaped
escapeChar - escape character
Returns:
the original string with escaped characters.

removeEscapes

public static java.lang.String removeEscapes(java.lang.String s,
                                             char escapeChar)
Remove all occurrences of escape characters.
Parameters:
s - original string
escapeChar - escape character
Returns:
the original string without escaped characters.


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.