Class PduUtilities
- java.lang.Object
-
- com.seleniumsoftware.SMPPSim.pdu.util.PduUtilities
-
public class PduUtilities extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PduUtilities()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbyteArrayToHexString(byte[] in)static intgetIntegerValue(byte[] msg, int start, int len)static java.lang.StringgetJavaEncoding(byte data_coding)static intgetRandomSubmitError()static shortgetShortValue(byte msb, byte lsb)static java.lang.StringgetStringValueFixedLength(byte[] pdu, int pduIndex, int actualLength)static java.lang.StringgetStringValueNullTerminated(byte[] pdu, int pduIndex, int maxlength, int type)byte[]getUnicodeMessageDataWithoutBom(java.lang.String text_message)static byte[]makeByteArrayFromInt(int i, int numBytes)static byte[]makeByteTLV(short t, short value)static byte[]makeCOctetStringTLV(short t, byte[] value)static byte[]makeRawTLV(short t, byte[] value)static byte[]makeShortTLV(short t, short value)static byte[]setPduLength(byte[] pdu, int l)static byte[]stringToNullTerminatedByteArray(java.lang.String input)
-
-
-
Method Detail
-
getRandomSubmitError
public static int getRandomSubmitError()
-
getStringValueNullTerminated
public static java.lang.String getStringValueNullTerminated(byte[] pdu, int pduIndex, int maxlength, int type) throws java.lang.Exception- Throws:
java.lang.Exception
-
getStringValueFixedLength
public static java.lang.String getStringValueFixedLength(byte[] pdu, int pduIndex, int actualLength) throws java.lang.Exception- Throws:
java.lang.Exception
-
getIntegerValue
public static int getIntegerValue(byte[] msg, int start, int len) throws java.lang.Exception- Throws:
java.lang.Exception
-
makeByteArrayFromInt
public static byte[] makeByteArrayFromInt(int i, int numBytes)
-
getShortValue
public static short getShortValue(byte msb, byte lsb) throws java.lang.Exception- Throws:
java.lang.Exception
-
stringToNullTerminatedByteArray
public static byte[] stringToNullTerminatedByteArray(java.lang.String input)
-
setPduLength
public static byte[] setPduLength(byte[] pdu, int l)
-
byteArrayToHexString
public static java.lang.String byteArrayToHexString(byte[] in)
-
makeShortTLV
public static byte[] makeShortTLV(short t, short value)
-
makeByteTLV
public static byte[] makeByteTLV(short t, short value)
-
makeCOctetStringTLV
public static byte[] makeCOctetStringTLV(short t, byte[] value)
-
makeRawTLV
public static byte[] makeRawTLV(short t, byte[] value)
-
getJavaEncoding
public static java.lang.String getJavaEncoding(byte data_coding)
-
getUnicodeMessageDataWithoutBom
public byte[] getUnicodeMessageDataWithoutBom(java.lang.String text_message) throws java.io.UnsupportedEncodingException- Throws:
java.io.UnsupportedEncodingException
-
-