Packages
 In this topic

*Methods

*Fields

 

Packages   PreviousThis Package
Package com.ms.lang   Previous This
Package

 


Class SystemX

public final class SystemX
{
  // Fields
  public static final int LANG_AFRIKAANS;
  public static final int LANG_ALBANIAN;
  public static final int LANG_ARABIC;
  public static final int LANG_BASQUE;
  public static final int LANG_BULGARIAN;
  public static final int LANG_BYELORUSSIAN;
  public static final int LANG_CATALAN;
  public static final int LANG_CHINESE;
  public static final int LANG_CROATIAN;
  public static final int LANG_CZECH;
  public static final int LANG_DANISH;
  public static final int LANG_DUTCH;
  public static final int LANG_ENGLISH;
  public static final int LANG_ESTONIAN;
  public static final int LANG_FINNISH;
  public static final int LANG_FRENCH;
  public static final int LANG_GERMAN;
  public static final int LANG_GREEK;
  public static final int LANG_HEBREW;
  public static final int LANG_HUNGARIAN;
  public static final int LANG_ICELANDIC;
  public static final int LANG_INDONESIAN;
  public static final int LANG_ITALIAN;
  public static final int LANG_JAPANESE;
  public static final int LANG_KOREAN;
  public static final int LANG_LATVIAN;
  public static final int LANG_LITHUANIAN;
  public static final int LANG_NORWEGIAN;
  public static final int LANG_POLISH;
  public static final int LANG_PORTUGUESE;
  public static final int LANG_ROMANIAN;
  public static final int LANG_RUSSIAN;
  public static final int LANG_SLOVAK;
  public static final int LANG_SLOVENIAN;
  public static final int LANG_SORBIAN;
  public static final int LANG_SPANISH;
  public static final int LANG_SWEDISH;
  public static final int LANG_THAI;
  public static final int LANG_TURKISH;
  public static final int LANG_UKRAINIAN;
  public static final int SUBLANG_CHINESE_HONGKONG;
  public static final int SUBLANG_CHINESE_SIMPLIFIED;
  public static final int SUBLANG_CHINESE_SINGAPORE;
  public static final int SUBLANG_CHINESE_TRADITIONAL;
  public static final int SUBLANG_DUTCH_BELGIAN;
  public static final int SUBLANG_ENGLISH_AUS;
  public static final int SUBLANG_ENGLISH_CAN;
  public static final int SUBLANG_ENGLISH_EIRE;
  public static final int SUBLANG_ENGLISH_NZ;
  public static final int SUBLANG_ENGLISH_UK;
  public static final int SUBLANG_ENGLISH_US;
  public static final int SUBLANG_FRENCH;
  public static final int SUBLANG_FRENCH_BELGIAN;
  public static final int SUBLANG_FRENCH_CANADIAN;
  public static final int SUBLANG_FRENCH_SWISS;
  public static final int SUBLANG_GERMAN;
  public static final int SUBLANG_GERMAN_AUSTRIAN;
  public static final int SUBLANG_GERMAN_SWISS;
  public static final int SUBLANG_ITALIAN;
  public static final int SUBLANG_ITALIAN_SWISS;
  public static final int SUBLANG_NORWEGIAN_BOKMAL;
  public static final int SUBLANG_NORWEGIAN_NYNORSK;
  public static final int SUBLANG_PORTUGUESE;
  public static final int SUBLANG_PORTUGUESE_BRAZILIAN;
  public static final int SUBLANG_SPANISH;
  public static final int SUBLANG_SPANISH_MEXICAN;
  public static final int SUBLANG_SPANISH_MODERN;

  // Methods
  public native static boolean arrayCompare(Object P[], int pStart,
        Object Q[], int qStart, int count);
  public native static void blockcopy(Object objsrc, int nSrcOffset, Object objDest, int nDestOffset, int cBytes); 
  public static native void compareString(int lcid, int flags, String string1, String string2);
  public static native void gc();
  public static InputManagerListener getDefaultInputManager();
  public static InputManagerListener getInputManager();
  public static int getKeyboardLanguage();
  public static String getKeyboardLanguageName(int id);
  public static int getKeyboardLanguages(int array[]);
  public static int [] getKeyboardLanguages();
  public static int getNumKeyboardLanguages();
  public native static boolean isLocalCharDBCSLeadByte(byte local);
  public static byte JavaStringToLocalString(char Uni);
  public static byte[] JavaStringToLocalString(char C[]);
  public static byte[] JavaStringToLocalString(char C[], int off,
        int len);
  public static String LocalStringToJavaString(String local);
  public static char[] LocalStringToJavaString(byte B[]);
  public static char[] LocalStringToJavaString(char B[]);
  public static char[] LocalStringToJavaString(byte B[], int off,
        int len);
  public static char[] LocalStringToJavaString(char B[], int off,
        int len);
  public static char LocalStringToJavaString(byte local);
  public static void setInputManager(InputManagerListener imm,
        boolean retainCurrentList);
  public static boolean setKeyboardLanguage(Applet App,
        int idLanguage);
}

This class provides system enhancements that implement extended functionality. The SystemX class cannot be instantiated or subclassed because all of the methods and variables are static.

Methods

arrayCompare

public native static boolean arrayCompare(Object P[], int pStart,
        Object Q[], int qStart, int count);

Compares two arrays.

Return Value:

Returns true if the two arrays are equal; otherwise, the method returns false.

ParameterDescription
P The first array.
pStart The first element of the first array.
Q The second array.
pStart The first element of the second array.
count The number of elements compared.

Exceptions:

nullPointerArray occurs if there are not enough items in the arrays.

blockcopy

public native static void 
    blockcopy(Object objSrc, int nSrcOffset, Object objDest, int nDestOffset, int cBytes);

Copies an array from the specified source array, beginning at the specified byte offset, to the specified byte offset of the destination array.

Unlike java.lang.System.arraycopy, the source and destination arrays must be of primitive type, although not necessarily of the same primitive type. This method essentially performs a memory copy between arrays, ignoring byte endianness. A subsequence of bytes are copied from the source array, referenced by objSrc, to the destination array, referenced by objDest. The number of bytes copied is equal to the cBytes parameter. The components at byte offsets nSrcOffset through nSrcOffset+cBytes-1 in the source array are copied into destination array starting at byte offset nDestOffset.

If the objSrc and objDest parameters refer to the same array object, the copying is performed as if the bytes at byte offset nSrcOffset through nSrcOffset+cBytes-1 were first copied to a temporary array, and then the contents of the temporary array were copied into the destination array starting at byte offset nDestOffset.

If either of the following statements are true, an ArrayStoreException is thrown and the destination is not modified:

  • The objSrc argument refers to an object that is not an array of primitive type.
  • The objDest argument refers to an object that is not an array of primitive type.

Otherwise, if any of the following statements are true, an ArrayIndexOutOfBoundsException is thrown and the destination is not modified:

  • The nSrcOffset argument is negative.
  • The nDestOffset argument is negative.
  • The cBytes argument is negative.
  • nSrcOffset+cBytes is greater than the number of bytes in objSrc, the source array.
  • nDstOffset+cBytes is greatet than the number of bytes in objDest, the destination array.

Return Value:

No return value.

ParameterDescription
objSrc The source array.
nSrcOffset The start byte offset in the source array.
objDest The destination array.
nDestOffset The start byte offset in the destination data.
cBytes The number of bytes to be copied.

Exceptions:

ArrayIndexOutOfBoundsException occurs if copying would cause access of data outside array bounds.

ArrayStoreException occurs if objSrc or objDest is not an array of primitive type.

compareString

public static native void compareString(int lcid, int flags, String string1, String string2);

Compares two strings using the Win32 CompareString using the supplied locale identifier and flags.

Return Value:

Returns -1 if string1 is less in lexical value than string2, 0 if string1 is equal in lexical value to string2, 1 if string1 is greater in lexical value to string2.

gc

public static native void gc();

Runs the garbage collector.

Return Value:

No return value.

Remarks:

Calling the gc method causes the virtual machine to perform garbage collection. When control returns from the method call, the virtual machine has made a best effort to reclaim space from all unused objects.

See Also: java.lang.Runtime.gc, java.lang.System.gc

getDefaultInputManager

public static InputManagerListener getDefaultInputManager();

Finds the default system input manager.

Return Value:

Returns the default system input manager.

getInputManager

public static InputManagerListener getInputManager();

Retrieves the current input method manager.

Return Value:

Returns null if an input method manager is not running.

getKeyboardLanguage

public static int getKeyboardLanguage();

Retrieves the currently active keyboard language.

Return Value:

Returns the currently active keyboard language.

getKeyboardLanguageName

public static String getKeyboardLanguageName(int id);

Retrieves the keyboard language name.

Return Value:

Returns the name of the language.

ParameterDescription
id Specifies the identifier of the keyboard language.

getKeyboardLanguages

public static int getKeyboardLanguages(int array[]);

Retrieves a list of the keyboard languages currently active in the system.

Return Value:

Returns the number of active languages.

ParameterDescription
array The list of keyboard language identifiers.

getKeyboardLanguages

public static int [] getKeyboardLanguages();

Retrieves a list of the keyboard languages currently active in the system.

Return Value:

Returns an array containing the active languages.

getNumKeyboardLanguages

public static int getNumKeyboardLanguages();

Finds the number of active keyboard languages in the system.

Return Value:

Returns the number of active keyboard languages in the system.

isLocalCharDBCSLeadByte

public native static boolean isLocalCharDBCSLeadByte(byte local);

Checks if a local code page character is a lead byte for DBCS systems.

Return Value:

Returns true if the local code page is DBCS; otherwise, returns false.

ParameterDescription
local The local code page character.

JavaStringToLocalString

public static byte JavaStringToLocalString(char Uni);

Converts a Java character to a character in the local code page.

Return Value:

Returns the local code page string.

ParameterDescription
Uni The Java character.

JavaStringToLocalString

public static byte[] JavaStringToLocalString(char C[]);

Converts a character array to a byte array in the local code page.

Return Value:

Returns the local representation of the array.

ParameterDescription
C The Java character array.

JavaStringToLocalString

public static byte[] JavaStringToLocalString(char C[], int off, int len);

Converts a character array to a byte array in the local code page.

Return Value:

Returns the local representation of the array.

ParameterDescription
C The Java character array.
off The starting point within the array.
len The number of characters to convert.

See Also: LocalStringToJavaString

LocalStringToJavaString

public static String LocalStringToJavaString(String local);

Converts a string from a local code page to Unicode.

Return Value:

Returns the Unicode representation of the string.

ParameterDescription
local The local code page string.

Remarks:

Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. For example, character 149 in the Microsoft® Windows® code page used in America (code page 1252) is a bullet. This is not true for the Macintosh or for many UNIX systems. So, if you make this a hard-coded value, the bullet does not appear correctly on other platforms.

LocalStringToJavaString

public static char[] LocalStringToJavaString(byte B[]);

Converts a byte array from a local code page to an Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local code page string.

See Also: LocalStringToJavaString

LocalStringToJavaString

public static char[] LocalStringToJavaString(char B[]);

Converts a char array from a local code page to an Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local code page array.

See Also: LocalStringToJavaString

LocalStringToJavaString

public static char[] LocalStringToJavaString(byte B[], int off, int len);

Converts a part of a byte array from a local code page to a Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local code page array.
off The starting point within the array.
len The length of the segment to convert.

See Also: LocalStringToJavaString

LocalStringToJavaString

public static char[] LocalStringToJavaString(char B[], int off, int len);

Converts a part of a character array from a local code page to an Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local code page array.
off The starting point within the array.
len The number of characters to convert.

See Also: LocalStringToJavaString

LocalStringToJavaString

public static char LocalStringToJavaString(byte local);

Converts a byte from a local code page to a Unicode character.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
local The local code page string.

See Also: LocalStringToJavaString

setInputManager

public static void setInputManager(InputManagerListener imm,
        boolean retainCurrentList);

Sets a new input method manager.

Return Value:

No return value.

ParameterDescription
imm The new input method manager. Set to null to disable input method manager services. If the new manager inherits the IME list from the previous one, set retainCurrentList to true.
retainCurrentList The parameter returns true if the new input method manager inherits the list of IMEs. Otherwise, returns false.

setKeyboardLanguage

public static boolean setKeyboardLanguage(Applet App, int idLanguage);

Sets a new active keyboard language.

Return Value:

Returns true if the action was successful. Otherwise, false is returned.

ParameterDescription
App The applet to set the language.
idLanguage The language to activate.

Fields

LANG_AFRIKAANS
The Afrikaans language constant.
LANG_ALBANIAN
The Albanian language constant.
LANG_ARABIC
The Arabic language constant.
LANG_BASQUE
The Basque language constant.
LANG_BULGARIAN
The Bulgarian language constant.
LANG_BYELORUSSIAN
The Byelorussian language constant.
LANG_CATALAN
The Catalan language constant.
LANG_CHINESE
The generic Chinese language constant.
LANG_CROATIAN
The Croatian language constant.
LANG_CZECH
The Czech language constant.
LANG_DANISH
The Danish language constant.
LANG_DUTCH
The Dutch language constant.
LANG_ENGLISH
The English language constant.
LANG_ESTONIAN
The Estonian language constant.
LANG_FINNISH
The Finnish language constant.
LANG_FRENCH
The French language constant.
LANG_GERMAN
The German language constant.
LANG_GREEK
The Greek language constant.
LANG_HEBREW
The Hebrew language constant.
LANG_HUNGARIAN
The Hungarian language constant.
LANG_ICELANDIC
The Icelandic language constant.
LANG_INDONESIAN
The Indonesian language constant.
LANG_ITALIAN
The Italian language constant.
LANG_JAPANESE
The Japanese language constant.
LANG_KOREAN
The Korean language constant.
LANG_LATVIAN
The Latvian language constant.
LANG_LITHUANIAN
The Lithuanian language constant.
LANG_NORWEGIAN
The Norwegian language constant.
LANG_POLISH
The Polish language constant.
LANG_PORTUGUESE
The Portuguese language constant.
LANG_ROMANIAN
The Romanian language constant.
LANG_RUSSIAN
The Russian language constant.
LANG_SLOVAK
The Slovakian language constant.
LANG_SLOVENIAN
The Slovenian language constant.
LANG_SORBIAN
The Sorbian language constant.
LANG_SPANISH
The Spanish language constant.
LANG_SWEDISH
The Swedish language constant.
LANG_THAI
The Thai language constant.
LANG_TURKISH
The Turkish language constant.
LANG_UKRAINIAN
The Ukrainian language constant.
SUBLANG_CHINESE_HONGKONG
The Hong Kong Chinese language constant.
SUBLANG_CHINESE_SIMPLIFIED
The Simplified Chinese language constant.
SUBLANG_CHINESE_SINGAPORE
The Singapore Chinese language constant.
SUBLANG_CHINESE_TRADITIONAL
The Traditional Chinese language constant.
SUBLANG_DUTCH_BELGIAN
The Belgian Dutch language constant.
SUBLANG_ENGLISH_AUS
The Australian English language constant.
SUBLANG_ENGLISH_CAN
The Canadian English language constant.
SUBLANG_ENGLISH_EIRE
The Erie (Irish) English language constant.
SUBLANG_ENGLISH_NZ
The New Zealand English language constant.
SUBLANG_ENGLISH_UK
The United Kingdom English language constant.
SUBLANG_ENGLISH_US
The United States English language constant.
SUBLANG_FRENCH
The French language constant.
SUBLANG_FRENCH_BELGIAN
The Belgian French language constant.
SUBLANG_FRENCH_CANADIAN
The French Canadian language constant.
SUBLANG_FRENCH_SWISS
The Swiss French language constant.
SUBLANG_GERMAN
The German language constant.
SUBLANG_GERMAN_AUSTRIAN
The Austrian German language constant.
SUBLANG_GERMAN_SWISS
The Swiss German language constant.
SUBLANG_ITALIAN
The Italian language constant.
SUBLANG_ITALIAN_SWISS
The Italian Swiss language constant.
SUBLANG_NORWEGIAN_BOKMAL
The Bokmal Norwegian language constant.
SUBLANG_NORWEGIAN_NYNORSK
The Nynorsk Norwegian language constant.
SUBLANG_PORTUGUESE
The Portuguese language constant.
SUBLANG_PORTUGUESE_BRAZILIAN
The Portuguese Brazilian language constant.
SUBLANG_SPANISH
The Spanish language constant.
SUBLANG_SPANISH_MEXICAN
The Spanish Mexican language constant.
SUBLANG_SPANISH_MODERN
The modern Spanish language constant.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.