Class PduUtilities


  • public class PduUtilities
    extends java.lang.Object
    • Field Detail

      • encodings

        private static java.lang.String[] encodings
      • logger

        private static java.util.logging.Logger logger
    • Constructor Detail

      • PduUtilities

        public PduUtilities()
    • 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