org.xnap.i18n
Class I18nHelper

java.lang.Object
  extended by org.xnap.i18n.I18nHelper

public class I18nHelper
extends java.lang.Object


Constructor Summary
I18nHelper()
           
 
Method Summary
static int find(java.lang.String haystack, java.lang.String needle)
          Returns the position of the first unescaped occurence of needle in haystack.
static int findI18nDivider(java.lang.String haystack)
           
static java.lang.String getI18nCharset(java.lang.String filename)
           
static java.lang.String i18nKeyToRaw(java.lang.String key)
           
static java.lang.String javaToRaw(java.lang.String s)
           
static java.lang.String rawToI18nKey(java.lang.String key)
           
static java.lang.String rawToJava(java.lang.String s)
           
static java.util.Hashtable readI18nFile(java.lang.String filename, boolean ignoreComments)
           
static java.util.HashSet readKeys()
           
static java.lang.String replaceAll(java.lang.String s, java.lang.String oldChars, java.lang.String newChars)
           
static void writeI18nFile(java.lang.String filename, java.util.Hashtable table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nHelper

public I18nHelper()
Method Detail

find

public static int find(java.lang.String haystack,
                       java.lang.String needle)
Returns the position of the first unescaped occurence of needle in haystack.


findI18nDivider

public static int findI18nDivider(java.lang.String haystack)

getI18nCharset

public static java.lang.String getI18nCharset(java.lang.String filename)

readI18nFile

public static java.util.Hashtable readI18nFile(java.lang.String filename,
                                               boolean ignoreComments)
                                        throws java.io.IOException
Throws:
java.io.IOException

readKeys

public static java.util.HashSet readKeys()

replaceAll

public static java.lang.String replaceAll(java.lang.String s,
                                          java.lang.String oldChars,
                                          java.lang.String newChars)

rawToI18nKey

public static java.lang.String rawToI18nKey(java.lang.String key)

i18nKeyToRaw

public static java.lang.String i18nKeyToRaw(java.lang.String key)

javaToRaw

public static java.lang.String javaToRaw(java.lang.String s)

rawToJava

public static java.lang.String rawToJava(java.lang.String s)

writeI18nFile

public static void writeI18nFile(java.lang.String filename,
                                 java.util.Hashtable table)
                          throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2001-2005 XNap Team. All Rights Reserved.