Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

j3
Class utils  view utils download utils.java

java.lang.Object
  extended byj3.utils

public class utils
extends java.lang.Object

My J3 utils class. Here one will find (hopefull many and good) utils that will assist in i18n programming, right now designed for Japanese and English


Field Summary
static int ASCII
          This was a pain in the ass.
static int BIG_5
           
static int BIG_5_PLUS
           
static java.lang.String[] charDics
          For uhh loading charDics
static int CNS
           
static int CNS_1
           
static int CNS_2
           
static int CNS_3
           
static int CNS_4
           
static int CNS_5
           
static int CNS_6
           
static int CNS_7
           
static java.lang.String[] codeArray
          Used to convert the integer returnVal into a string that is more human friendly
static java.lang.String dict
          String for finding dictionary stuff
static java.lang.String[] EDICTDics
          EDICTS
static int EOF
           
static int ESC
           
static int EUC
           
static int EUC_CN
           
static int EUC_JP
           
static int EUC_KR
           
static int EUC_TW
           
static int EUCORSJIS
           
static java.lang.String fileSep
          system dependent fileSeparator
static int GB_2312_80
           
static int GB_7589
           
static int GB_7590
           
static int HALF_WIDTH_KATAKANA
           
static int ISO_2022_KR
           
static int ISO_8859_1
           
static int ISO_8859_7
           
static int ISO_IR_165
           
static int ISO2022
           
static int JIS
           
static int JIS_C_6226_1978
           
static int JIS_ROMAN
           
static int JIS_X_0208_1983
           
static int JIS_X_0208_1990
           
static int JIS_X_0208_1997
           
static int JIS_X_0212_1990
           
static int JOHAB
           
static int KS_X_1001
           
static java.lang.String lineSep
          system dependent lineSeparator
static int NEC
           
static java.lang.String pathSep
          system dependent pathSeparator
static int SHIFT_JIS_X_0208
           
static int SJIS
           
static java.lang.String[] stringDics
          For loading String dics
static int UCS_2
           
static int UCS_4
           
static int UTF_16
           
static int UTF_7
           
static int UTF_8
           
static java.lang.String[] verboseCodeArray
           
 
Constructor Summary
utils()
           
 
Method Summary
static java.lang.String convertToAcronym(int code)
          'Table look up' -- go Novak!
static int convertToKnownCode(int code)
          Converts to Java-knowable stream names
static int explicate(java.lang.String fileName)
          explicate, here, is an adaptation (with minimal changes) to Ken Lunde's jcode.c.
protected static java.lang.String getNextDictionaryNumber(java.util.Properties globalProps)
          Helper method thtat gets the integer representing the highest numbered dictionary entry and adds one to it: eg: If your ...properties file has the following in it: Dictionary.1 Dictionary.2 Dictionary.3 This'll return "4"
static void listCharsets()
          listCharsets gets and lists all the charsets your VM knows about
static void main(java.lang.String[] args)
          example of how to use the code.
static void pause(long numberMillis)
          pause just a sec.
protected static void saveInitFile(java.util.Properties globalProps)
          Saves the current state of the init file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dict

public static java.lang.String dict
String for finding dictionary stuff


lineSep

public static java.lang.String lineSep
system dependent lineSeparator


pathSep

public static java.lang.String pathSep
system dependent pathSeparator


fileSep

public static java.lang.String fileSep
system dependent fileSeparator


charDics

public static java.lang.String[] charDics
For uhh loading charDics


stringDics

public static java.lang.String[] stringDics
For loading String dics


EDICTDics

public static java.lang.String[] EDICTDics
EDICTS


codeArray

public static java.lang.String[] codeArray
Used to convert the integer returnVal into a string that is more human friendly


verboseCodeArray

public static java.lang.String[] verboseCodeArray

EOF

public static int EOF

ESC

public static int ESC

ASCII

public static int ASCII
This was a pain in the ass.


GB_2312_80

public static int GB_2312_80

GB_7589

public static int GB_7589

GB_7590

public static int GB_7590

CNS

public static int CNS

CNS_1

public static int CNS_1

CNS_2

public static int CNS_2

CNS_3

public static int CNS_3

CNS_4

public static int CNS_4

CNS_5

public static int CNS_5

CNS_6

public static int CNS_6

CNS_7

public static int CNS_7

ISO_IR_165

public static int ISO_IR_165

JIS_ROMAN

public static int JIS_ROMAN

JIS_C_6226_1978

public static int JIS_C_6226_1978

JIS_X_0208_1983

public static int JIS_X_0208_1983

JIS_X_0208_1990

public static int JIS_X_0208_1990

JIS_X_0208_1997

public static int JIS_X_0208_1997

JIS_X_0212_1990

public static int JIS_X_0212_1990

KS_X_1001

public static int KS_X_1001

ISO_8859_1

public static int ISO_8859_1

ISO_8859_7

public static int ISO_8859_7

ISO_2022_KR

public static int ISO_2022_KR

EUC_CN

public static int EUC_CN

EUC_TW

public static int EUC_TW

EUC_KR

public static int EUC_KR

EUC_JP

public static int EUC_JP

BIG_5

public static int BIG_5

BIG_5_PLUS

public static int BIG_5_PLUS

SHIFT_JIS_X_0208

public static int SHIFT_JIS_X_0208

JOHAB

public static int JOHAB

UCS_2

public static int UCS_2

UCS_4

public static int UCS_4

UTF_7

public static int UTF_7

UTF_8

public static int UTF_8

UTF_16

public static int UTF_16

HALF_WIDTH_KATAKANA

public static int HALF_WIDTH_KATAKANA

EUCORSJIS

public static int EUCORSJIS

EUC

public static int EUC

SJIS

public static int SJIS

NEC

public static int NEC

ISO2022

public static int ISO2022

JIS

public static int JIS
Constructor Detail

utils

public utils()
Method Detail

listCharsets

public static void listCharsets()
listCharsets gets and lists all the charsets your VM knows about


explicate

public static int explicate(java.lang.String fileName)
explicate, here, is an adaptation (with minimal changes) to Ken Lunde's jcode.c. Without sounding obseqious, Ken Lunde is the 'man' when it comes to CJKV Information Processing. It peeks at a text file and checks out the encoding returning a value corresponding to the codeArray above


convertToAcronym

public static java.lang.String convertToAcronym(int code)
'Table look up' -- go Novak!


convertToKnownCode

public static int convertToKnownCode(int code)
Converts to Java-knowable stream names


saveInitFile

protected static void saveInitFile(java.util.Properties globalProps)
Saves the current state of the init file


getNextDictionaryNumber

protected static java.lang.String getNextDictionaryNumber(java.util.Properties globalProps)
Helper method thtat gets the integer representing the highest numbered dictionary entry and adds one to it: eg: If your ...properties file has the following in it: Dictionary.1 Dictionary.2 Dictionary.3 This'll return "4"


pause

public static void pause(long numberMillis)
pause just a sec.


main

public static void main(java.lang.String[] args)
example of how to use the code. java -classpath C:\playground\ J3.utils C:\temp\test.sjis.txt or similar will work