Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IM Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.siemens.icm.io
Class ATStringConverter

    java.lang.Object
      com.siemens.icm.io.ATStringConverter

public class ATStringConverter
extends Object

The ATStringConverter class contains conversion functions for easy conversion between Java strings and GSM or UCS2 encoded strings to be used for parameters of several AT commands via the ATCommand class.

See Also:
  `ATCommand`

Constructor Summary
`ATStringConverter()`

Method Summary
`static String` | `GSM2Java(String str)` Converts a GSM encoded string into a Java encoded string.
`static String` | `Java2GSM(String str)` Converts a Java encoded string into a GSM encoded string.
`static String` | `Java2UCS2Hex(String str)` Converts a Java encoded string into a string containing the characters in the UCS2 hex format.
`static String` | `UCS2Hex2Java(String str)` Converts a string in the UCS2 hex format into a Java encoded string.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ATStringConverter

    public ATStringConverter()

Method Detail

### Java2GSM

    public static String Java2GSM(String str)
                           throws IllegalArgumentException

  Converts a Java encoded string into a GSM encoded string.

  Parameters:
    `str` - The String instance from Java to be converted.
  Returns:
    A Java String instance that holds the GSM encoded string.
  Throws:
    `IllegalArgumentException` - If one or more characters cannot be mapped to GSM encoding.

### GSM2Java

    public static String GSM2Java(String str)

  Converts a GSM encoded string into a Java encoded string.

  Parameters:
    `str` - The GSM encoded string to be converted.
  Returns:
    A Java String instance that holds the conversion result.

### Java2UCS2Hex

    public static String Java2UCS2Hex(String str)

  Converts a Java encoded string into a string containing the characters in the UCS2 hex format.

  Parameters:
    `str` - The String instance from Java to be converted.
  Returns:
    A Java String instance that holds the UCS2 encoded hex string.

### UCS2Hex2Java

    public static String UCS2Hex2Java(String str)
                               throws IllegalArgumentException

  Converts a string in the UCS2 hex format into a Java encoded string.

  Parameters:
    `str` - The UCS2 hex string to be converted.
  Returns:
    A Java String instance that holds the conversion result.
  Throws:
    `IllegalArgumentException` - If the passed string isn't in proper UCS2 hex format.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IM Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a comment or suggestion Version 2.0 of IM Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.