public class Formatter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
Constructor and Description |
---|
Formatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
formatString(java.lang.String value,
int maxWidth,
boolean multiple,
boolean ellipsis)
Format a string as a number of continuation fields, so that the total string is not too long.
|
static java.lang.String |
formatTime(java.util.TimeZone tz,
java.util.Locale locale,
long time)
Format a long as an understandable date.
|
protected static void |
writechars(java.lang.StringBuilder sb,
int value,
int length) |
public static final java.lang.String _rcsid
public static java.lang.String formatTime(java.util.TimeZone tz, java.util.Locale locale, long time)
time
- is the long.public static java.lang.String[] formatString(java.lang.String value, int maxWidth, boolean multiple, boolean ellipsis)
value
- is the string to format.maxWidth
- is the maximum width desired for each field.multiple
- is true if multiple lines desired.ellipsis
- is true if ellipses are desired for each non-terminal line.protected static void writechars(java.lang.StringBuilder sb, int value, int length)