|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.nls.NLSIniFileLoader
public class NLSIniFileLoader
This loader is capable of reading text values from an NLS-ini file to one or more TextContainer objects.
Constructor Summary | |
---|---|
NLSIniFileLoader()
Initialize the new instance with default values. |
Method Summary | |
---|---|
protected org.pfsw.util.CollectionUtil |
coll()
|
protected TextContainerList |
createTextContainerList(java.util.Locale[] locales)
|
protected java.lang.String |
getCharacterEncoding()
|
java.lang.String |
getDefaultEncoding()
Returns the default encoding that will be used to read text from a file if no explicit encoding was provided. |
protected java.lang.String |
getEncoding()
Returns the encoding that should be used. |
protected java.lang.String |
getMetadataIndicator()
Sections that start with the prefix returned by this method are treated as metedata sections. |
protected void |
handleMetadataSection(org.pfsw.settings.Settings settings,
java.lang.String sectionName)
|
protected void |
handleMetadataSections(org.pfsw.settings.Settings settings,
java.lang.String[] sectionNames)
|
protected void |
handleTextKeys(TextContainerList textContainers,
org.pfsw.settings.Settings settings,
java.lang.String[] textKeys,
java.lang.String[] localeNames)
|
TextContainer |
loadText(java.io.File file,
java.util.Locale locale)
Returns a text container with all texts for the specified locale from the given file. |
TextContainerList |
loadText(java.io.File file,
java.util.Locale[] locales)
Returns a list of text containers with all texts for the specified locales from the given file. |
TextContainer |
loadText(org.pfsw.file.FileLocator fileLocator,
java.util.Locale locale)
Returns a text container with all texts for the specified locale from the given file. |
TextContainerList |
loadText(org.pfsw.file.FileLocator fileLocator,
java.util.Locale[] locales)
Returns a list of text containers with all texts for the specified locales from the given file. |
TextContainer |
loadText(org.pfsw.file.FileLocator fileLocator,
java.lang.String localeName)
Returns a text container with all texts for the specified locale from the given file. |
TextContainerList |
loadText(org.pfsw.file.FileLocator fileLocator,
java.lang.String[] localeNames)
Returns a list of text containers with all texts for the specified locales from the given file. |
TextContainer |
loadText(java.io.File file,
java.lang.String localeName)
Returns a text container with all texts for the specified locale from the given file. |
TextContainerList |
loadText(java.io.File file,
java.lang.String[] localeNames)
Returns a list of text containers with all texts for the specified locales from the given file. |
protected TextContainerList |
loadTextContainers(org.pfsw.file.FileLocator locator,
java.util.Locale[] locales)
|
protected java.lang.String[] |
localesToStrings(java.util.Locale[] locales)
|
protected NLSUtil |
nls()
|
protected org.pfsw.text.StringUtil |
str()
|
protected java.util.Locale[] |
stringsToLocales(java.lang.String[] localeNames)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NLSIniFileLoader()
Method Detail |
---|
public TextContainer loadText(java.io.File file, java.lang.String localeName)
public TextContainer loadText(java.io.File file, java.util.Locale locale)
public TextContainerList loadText(java.io.File file, java.util.Locale[] locales)
public TextContainerList loadText(java.io.File file, java.lang.String[] localeNames)
public TextContainer loadText(org.pfsw.file.FileLocator fileLocator, java.lang.String localeName)
public TextContainer loadText(org.pfsw.file.FileLocator fileLocator, java.util.Locale locale)
public TextContainerList loadText(org.pfsw.file.FileLocator fileLocator, java.util.Locale[] locales)
public TextContainerList loadText(org.pfsw.file.FileLocator fileLocator, java.lang.String[] localeNames)
public java.lang.String getDefaultEncoding()
protected TextContainerList loadTextContainers(org.pfsw.file.FileLocator locator, java.util.Locale[] locales)
protected void handleTextKeys(TextContainerList textContainers, org.pfsw.settings.Settings settings, java.lang.String[] textKeys, java.lang.String[] localeNames)
protected java.lang.String[] localesToStrings(java.util.Locale[] locales)
protected java.util.Locale[] stringsToLocales(java.lang.String[] localeNames)
protected TextContainerList createTextContainerList(java.util.Locale[] locales)
protected void handleMetadataSections(org.pfsw.settings.Settings settings, java.lang.String[] sectionNames)
protected void handleMetadataSection(org.pfsw.settings.Settings settings, java.lang.String sectionName)
protected java.lang.String getCharacterEncoding()
protected java.lang.String getEncoding()
getDefaultEncoding()
protected java.lang.String getMetadataIndicator()
protected org.pfsw.util.CollectionUtil coll()
protected NLSUtil nls()
protected org.pfsw.text.StringUtil str()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |