|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.util.Formatter
This class provides functions for formatting Strings
Constructor Summary | |
private |
Formatter()
Constructor |
Method Summary | |
static java.lang.String |
formatBytes(long bytes)
Formats Bytes in the format ..bytes, ..kb oder ..mb |
static java.lang.String |
formatDate(java.util.Date date)
This method returns a String representing a formatted date. |
static java.lang.String |
formatDate(java.util.Date date,
java.lang.String zone)
This method returns a String representing a formatted date. |
static java.lang.String |
formatDateAndTime(java.util.Date date)
This method returns a String representing a formatted date. |
static java.lang.String |
formatDateAndTime(long date)
This method returns a String representing a formatted date. |
static java.lang.String |
formatTime(java.sql.Time time)
This method returns a String representing a formatted time. |
static java.lang.String |
formatTimeSpan(long span)
This method returns a String representing a formatted time span. |
static java.util.Locale |
parseLocale(java.lang.String locale)
Parses a String into a Locale Object. |
static java.util.TimeZone |
parseTimeZone(java.lang.String zone)
Parses a String into a TimeZone Object. |
static java.lang.String |
splitHtmlString(java.lang.String str,
int length)
This method inserts a HTML break tag at the specified position into an String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private Formatter()
Method Detail |
public static java.util.Locale parseLocale(java.lang.String locale)
locale
- String to parse
null
when the String is emptypublic static java.util.TimeZone parseTimeZone(java.lang.String zone)
zone
- String to parse
null
when the String is emptypublic static java.lang.String formatBytes(long bytes)
bytes
- Number to format
public static java.lang.String formatDate(java.util.Date date)
date
- The date value to be formatted into a time string.
public static java.lang.String formatDate(java.util.Date date, java.lang.String zone)
date
- The date value to be formatted into a date string.zone
- The timezone value to be used in the formatted date string
public static java.lang.String formatDateAndTime(java.util.Date date)
date
- The date value to be formatted into a time string.
public static java.lang.String formatDateAndTime(long date)
date
- The date value to be formatted into a time string.
public static java.lang.String formatTime(java.sql.Time time)
time
- The time value to be formatted into a time string.
public static java.lang.String formatTimeSpan(long span)
span
- The time span
public static java.lang.String splitHtmlString(java.lang.String str, int length)
str
- String to processlength
- Position where the break should be inserted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |