|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.marre.sms.SmsPduUtil
Various functions to encode and decode strings
| Field Summary | |
static char |
EXT_TABLE_PREFIX
|
static char[] |
GSM_DEFAULT_ALPHABET_ALTERNATIVES
Some alternative character encodings. |
static char[] |
GSM_DEFAULT_ALPHABET_TABLE
Default alphabet table according to GSM 03.38. |
| Method Summary | |
static void |
arrayCopy(byte[] theSrc,
int theSrcStart,
byte[] theDest,
int theDestStart,
int theLength)
|
static void |
arrayCopy(byte[] theSrc,
int theSrcStart,
byte[] theDest,
int theDestStart,
int theDestBitOffset,
int theBitLength)
|
static char |
fromGsmCharset(byte gsmChar)
Convert from the GSM charset to a unicode char |
static byte[] |
getSeptets(java.lang.String theMsg)
Pack the given string into septets |
static java.lang.String |
readBcdNumber(byte[] arr,
int offset,
int theLength)
Converts bytes to BCD format |
static java.lang.String |
readBcdNumber(java.io.InputStream theIs,
int theLength)
Converts bytes to BCD format |
static java.lang.String |
readSeptets(byte[] theArray,
int theLength)
Decodes a 7-bit encoded string from the given byte array |
static java.lang.String |
readSeptets(java.io.InputStream theIs,
int theLength)
Decodes a 7-bit encoded string from the stream |
static byte |
toGsmCharset(char theUnicodeCh)
Convert a unicode char to a GSM char |
static byte[] |
toGsmCharset(java.lang.String str)
Converts a unicode string to GSM charset |
static void |
writeBcdNumber(java.io.OutputStream theOs,
java.lang.String theNumber)
Writes the given phonenumber to the stream (BCD coded) |
static void |
writeSeptets(java.io.OutputStream theOs,
java.lang.String theMsg)
Pack the given string into septets. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final char EXT_TABLE_PREFIX
public static final char[] GSM_DEFAULT_ALPHABET_TABLE
public static final char[] GSM_DEFAULT_ALPHABET_ALTERNATIVES
char unicode = GSM_DEFAULT_ALPHABET_ALTERNATIVES[i * 2];char gsm = GSM_DEFAULT_ALPHABET_ALTERNATIVES[i*2+1];See http://www.unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT
| Method Detail |
public static byte[] getSeptets(java.lang.String theMsg)
public static void writeSeptets(java.io.OutputStream theOs,
java.lang.String theMsg)
throws java.io.IOException
theOs - Write the septets into this streamtheMsg - The message to encode
java.io.IOException - Thrown when failing to write to theOs
public static java.lang.String readSeptets(byte[] theArray,
int theLength)
theArray - The byte array to read fromtheLength - Number of decoded chars to read from the stream
public static java.lang.String readSeptets(java.io.InputStream theIs,
int theLength)
throws java.io.IOException
theIs - The stream to read fromtheLength - Number of decoded chars to read from the stream
java.io.IOException - when failing to read from theIs
public static void writeBcdNumber(java.io.OutputStream theOs,
java.lang.String theNumber)
throws java.io.IOException
theOs - Stream to write totheNumber - Number to convert
java.io.IOException - when failing to write to theOs
public static java.lang.String readBcdNumber(java.io.InputStream theIs,
int theLength)
throws java.io.IOException
theIs - The byte InputStreamtheLength - how many
java.io.IOException
public static java.lang.String readBcdNumber(byte[] arr,
int offset,
int theLength)
arr - bytearraytheLength - how manyoffset -
public static char fromGsmCharset(byte gsmChar)
gsmChar - The gsm char to convert
public static byte[] toGsmCharset(java.lang.String str)
str - String to convert
public static byte toGsmCharset(char theUnicodeCh)
theUnicodeCh - The unicode char to convert
public static void arrayCopy(byte[] theSrc,
int theSrcStart,
byte[] theDest,
int theDestStart,
int theLength)
public static void arrayCopy(byte[] theSrc,
int theSrcStart,
byte[] theDest,
int theDestStart,
int theDestBitOffset,
int theBitLength)
theSrc - theSrcStart - theDest - theDestStart - theDestBitOffset - theBitLength - In bits
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||