TimestampFormat
@Deprecated public class TimeStampFormat extends Format
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.
Format.Field
Constructor and Description |
---|
TimeStampFormat()
Deprecated.
Creates a new TimeStampFormat using the current Locale.
|
TimeStampFormat(String pattern)
Deprecated.
Creates a new TimeStampFormat using the given pattern and the symbols
from the current Locale.
|
TimeStampFormat(String pattern,
DateFormatSymbols symbols)
Deprecated.
Creates a new TimeStampFormat using the given pattern and symbols.
|
TimeStampFormat(String pattern,
Locale locale)
Deprecated.
Creates a new TimeStampFormat using the given pattern and the symbols
from the current Locale.
|
Modifier and Type | Method and Description |
---|---|
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
Deprecated.
|
String |
format(TimeStamp timeStamp)
Deprecated.
Formats the given TimeStamp.
|
TimeZone |
getTimeZone()
Deprecated.
Returns the time zone used to format the timestamp.
|
Object |
parseObject(String source,
ParsePosition pos)
Deprecated.
NB: Not supported
|
void |
setTimeZome(TimeZone zone)
Deprecated.
Changes the time zone used to format the timestamp.
|
clone, format, formatToCharacterIterator, parseObject
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 void setTimeZome(TimeZone zone)
zone
- a new time zonepublic TimeZone getTimeZone()
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
public String format(TimeStamp timeStamp)
timeStamp
- a TimeStamppublic Object parseObject(String source, ParsePosition pos)
parseObject
in class Format
Copyright © 2012. All Rights Reserved.