public class Formatter extends Object
| Constructor and Description |
|---|
Formatter() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
formatString(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 String |
formatTime(long time)
Format a long as an understandable date.
|
protected static void |
writechars(StringBuilder sb,
int value,
int length) |
public static final String _rcsid
public static String formatTime(long time)
time - is the long.public static String[] formatString(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(StringBuilder sb, int value, int length)