FileDocCategorySizeDatePackage
DateFormatProvider.javaAPI DocJava SE 6 API4338Tue Jun 10 00:25:52 BST 2008java.text.spi

DateFormatProvider

public abstract class DateFormatProvider extends LocaleServiceProvider
An abstract class for service providers that provide concrete implementations of the {@link java.text.DateFormat DateFormat} class.
since
1.6
version
@(#)DateFormatProvider.java 1.2 05/11/17

Fields Summary
Constructors Summary
protected DateFormatProvider()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

    
Methods Summary
public abstract java.text.DateFormatgetDateInstance(int style, java.util.Locale locale)
Returns a new DateFormat instance which formats date with the given formatting style for the specified locale.

param
style the given formatting style. Either one of {@link java.text.DateFormat#SHORT DateFormat.SHORT}, {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM}, {@link java.text.DateFormat#LONG DateFormat.LONG}, or {@link java.text.DateFormat#FULL DateFormat.FULL}.
param
locale the desired locale.
exception
IllegalArgumentException if style is invalid, or if locale isn't one of the locales returned from {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() getAvailableLocales()}.
exception
NullPointerException if locale is null
return
a date formatter.
see
java.text.DateFormat#getDateInstance(int, java.util.Locale)

public abstract java.text.DateFormatgetDateTimeInstance(int dateStyle, int timeStyle, java.util.Locale locale)
Returns a new DateFormat instance which formats date and time with the given formatting style for the specified locale.

param
dateStyle the given date formatting style. Either one of {@link java.text.DateFormat#SHORT DateFormat.SHORT}, {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM}, {@link java.text.DateFormat#LONG DateFormat.LONG}, or {@link java.text.DateFormat#FULL DateFormat.FULL}.
param
timeStyle the given time formatting style. Either one of {@link java.text.DateFormat#SHORT DateFormat.SHORT}, {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM}, {@link java.text.DateFormat#LONG DateFormat.LONG}, or {@link java.text.DateFormat#FULL DateFormat.FULL}.
param
locale the desired locale.
exception
IllegalArgumentException if dateStyle or timeStyle is invalid, or if locale isn't one of the locales returned from {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() getAvailableLocales()}.
exception
NullPointerException if locale is null
return
a date/time formatter.
see
java.text.DateFormat#getDateTimeInstance(int, int, java.util.Locale)

public abstract java.text.DateFormatgetTimeInstance(int style, java.util.Locale locale)
Returns a new DateFormat instance which formats time with the given formatting style for the specified locale.

param
style the given formatting style. Either one of {@link java.text.DateFormat#SHORT DateFormat.SHORT}, {@link java.text.DateFormat#MEDIUM DateFormat.MEDIUM}, {@link java.text.DateFormat#LONG DateFormat.LONG}, or {@link java.text.DateFormat#FULL DateFormat.FULL}.
param
locale the desired locale.
exception
IllegalArgumentException if style is invalid, or if locale isn't one of the locales returned from {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() getAvailableLocales()}.
exception
NullPointerException if locale is null
return
a time formatter.
see
java.text.DateFormat#getTimeInstance(int, java.util.Locale)