public class UtcTimeOnlyConverter extends Object
Constructor and Description |
---|
UtcTimeOnlyConverter() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertDigitSequence(String value,
int i,
int j,
String type) |
protected static void |
assertLength(String value,
int i,
String type) |
protected static void |
assertSeparator(String value,
int offset,
char ch,
String type) |
static String |
convert(Date d,
boolean includeMilliseconds)
Convert a time (represented as a Date) to a String (HH:MM:SS or HH:MM:SS.SSS)
|
static Date |
convert(String value)
Convert between a String and a time
|
protected DateFormat |
createDateFormat(String format) |
protected static long |
parseLong(String s) |
protected static void |
throwFieldConvertError(String value,
String type) |
public static String convert(Date d, boolean includeMilliseconds)
d
- the date with the time to convertincludeMilliseconds
- controls whether milliseconds are included in the resultpublic static Date convert(String value) throws FieldConvertError
value
- the string to parseFieldConvertError
- raised for invalid time stringprotected static void assertLength(String value, int i, String type) throws FieldConvertError
FieldConvertError
protected static void assertDigitSequence(String value, int i, int j, String type) throws FieldConvertError
FieldConvertError
protected static void assertSeparator(String value, int offset, char ch, String type) throws FieldConvertError
FieldConvertError
protected static void throwFieldConvertError(String value, String type) throws FieldConvertError
FieldConvertError
protected static long parseLong(String s)
protected DateFormat createDateFormat(String format)
Copyright © 2016. All rights reserved.