public class CharUtils extends Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
ASCII_GSM_MAP |
static byte[] |
GSM_MAP |
static byte |
ILLEGAL_ASCII_GSM |
static byte |
ILLEGAL_GSM |
Constructor and Description |
---|
CharUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
asciiToGSM(byte[] bytes)
Converts a bytearray of 8-bit characters into the 7-bit GSM alphabet.
|
static byte[] |
encodeBytes(byte[] bytes)
Encodes 'special' characters in an ASCII byte-array (preparation for sending string to DP5)
|
static byte[] |
filterASCIIBytes(byte[] bytes)
Removes and converts "unsafe" (in GSM alphabet context) ASCII bytes.
|
static String |
formatGSMBytes(byte[] bytes)
Format a byte array according to byte representation (hex encoded) on Sim-card.
|
protected static void |
initializeMaps() |
public static final byte[] ASCII_GSM_MAP
public static final byte[] GSM_MAP
public static final byte ILLEGAL_ASCII_GSM
public static final byte ILLEGAL_GSM
public static byte[] filterASCIIBytes(byte[] bytes)
bytes
- the ASCII byte-array with possible "unsafe" bytespublic static byte[] asciiToGSM(byte[] bytes)
bytes
- the byte-array of 8-bit ASCII characterspublic static byte[] encodeBytes(byte[] bytes)
bytes
- the byte-array with possible 'special' characterspublic static String formatGSMBytes(byte[] bytes)
bytes
- the bytes to formatprotected static void initializeMaps()
Copyright © 2017 Nets Branch Norway. All Rights Reserved.