|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.text.Format
org.epics.pvmanager.util.TimeStampFormat
public class TimeStampFormat
Implements a formatting class to format timestamps. The format String
is exactly the one supported by the SimpleDateFormat
, except
that it supports the nanosecond field identified by N.
For example, the pattern "yyyy-MM-dd'T'HH:mm:ss.NNNNNNNNNZ" formats to 2001-07-04T12:08:56.012345678-0700
Parsing is not currently supported.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.Format |
---|
Format.Field |
Constructor Summary | |
---|---|
TimeStampFormat()
Creates a new TimeStampFormat using the current Locale. |
|
TimeStampFormat(String pattern)
Creates a new TimeStampFormat using the given pattern and the symbols from the current Locale. |
|
TimeStampFormat(String pattern,
DateFormatSymbols symbols)
Creates a new TimeStampFormat using the given pattern and symbols. |
|
TimeStampFormat(String pattern,
Locale locale)
Creates a new TimeStampFormat using the given pattern and the symbols from the current Locale. |
Method Summary | |
---|---|
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
|
String |
format(TimeStamp timeStamp)
Formats the given TimeStamp. |
TimeZone |
getTimeZone()
Returns the time zone used to format the timestamp. |
Object |
parseObject(String source,
ParsePosition pos)
NB: Not supported |
void |
setTimeZome(TimeZone zone)
Changes the time zone used to format the timestamp. |
Methods inherited from class java.text.Format |
---|
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeStampFormat()
public TimeStampFormat(String pattern)
pattern
- the pattern describing the date and time formatpublic TimeStampFormat(String pattern, DateFormatSymbols symbols)
pattern
- the pattern describing the date and time formatsymbols
- symbols to be used in formattingpublic TimeStampFormat(String pattern, Locale locale)
pattern
- the pattern describing the date and time formatlocale
- the Locale to be usedMethod Detail |
---|
public void setTimeZome(TimeZone zone)
zone
- a new time zonepublic TimeZone getTimeZone()
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
format
in class Format
public String format(TimeStamp timeStamp)
timeStamp
- a TimeStamp
public Object parseObject(String source, ParsePosition pos)
parseObject
in class Format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |