info.informatica.util.locale
Class LocaleParser

java.lang.Object
  extended by info.informatica.util.locale.LocaleParser

public final class LocaleParser
extends Object

Parses a String for a Locale.

Version:
1.00
Author:
Carlos Amengual

Constructor Summary
LocaleParser()
           
 
Method Summary
static Locale parseHttpLocale(String loc)
          Parses an HTTP accept-language String to return a Locale.
static Locale parseLocale(String loc)
          Parses a String to return a Locale.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleParser

public LocaleParser()
Method Detail

parseLocale

public static Locale parseLocale(String loc)
Parses a String to return a Locale.

Parameters:
loc - a String with the locale specification
Returns:
the corresponding Locale object

parseHttpLocale

public static Locale parseHttpLocale(String loc)
Parses an HTTP accept-language String to return a Locale.

Parameters:
loc - an HTTP accept-language String with the locale specification
Returns:
the corresponding Locale object