ie.ncl.sms.gsm
Class GsmDecoder
java.lang.Object
ie.ncl.util.bin.Bytes
ie.ncl.net.pdu.Decoder
ie.ncl.sms.gsm.GsmDecoder
- All Implemented Interfaces:
- GsmConstants
public class GsmDecoder
- extends ie.ncl.net.pdu.Decoder
- implements GsmConstants
Encode messages as defined in the OTA spec GSM 03.40.
Currently only submit is implemented.
Fields inherited from class ie.ncl.net.pdu.Decoder |
asciiStringEncoding |
Fields inherited from interface ie.ncl.sms.gsm.GsmConstants |
SMS_COMMAND, SMS_DELIVER, SMS_DELIVER_REPORT, SMS_STATUS_REPORT, SMS_SUBMIT, SMS_SUBMIT_REPORT, TP_MR_BYTE, TP_MR_SIZE, TP_MTI_BYTE, TP_MTI_MASK, TP_MTI_SHIFT, TP_RD_BITMASK, TP_RD_BYTE, TP_RP_BITMASK, TP_RP_BYTE, TP_SRI_BITMASK, TP_SRI_BYTE, TP_SRR_BITMASK, TP_SRR_BYTE, TP_UDHI_BITMASK, TP_UDHI_BYTE, TP_VP_ABSOLUTE, TP_VP_ENHANCED, TP_VP_NONE, TP_VP_RELATIVE |
Methods inherited from class ie.ncl.net.pdu.Decoder |
dataLeft, hasMoreData, peekInt8, readAsciiz, readBcd, readBoolean8, readBoolean8Array, readByte, readByteArray, readByteArray, readInt16, readInt16Array, readInt32, readInt32Array, readInt8, readInt8Array, readString, readString, readUtc |
Methods inherited from class ie.ncl.util.bin.Bytes |
append, append, append, append, append, asciiString, binaryChar, binaryString, binaryString, copyTo, getByte, getBytes, hexDump, hexString, hexStringToBytes, hexStringWithSpaces, length, quadChar, rbinaryChar, setAllocationSize, subarray, subarray, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GsmDecoder
public GsmDecoder(byte[] bytes)
log
public static void log(java.lang.String s)
readDate
public java.util.Date readDate()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readSemiOctet
public int readSemiOctet()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readSignedSemiOctet
public int readSignedSemiOctet()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
dbg
public static void dbg(java.lang.String s)
readSmscAddress
public GsmAddress readSmscAddress()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readAddress
public GsmAddress readAddress()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
septetRoundup
public static int septetRoundup(int numberOfOctets)
readValidityPeriod
public ValidityPeriod readValidityPeriod(int validityPeriodFormat)
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readSubmitOrDeliver
public java.lang.Object readSubmitOrDeliver()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readDeliver
public Deliver readDeliver()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readReport
public Report readReport()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
readBit
public boolean readBit()
readBits
public int readBits(int bitCount)
read8Bits
public void read8Bits()
throws ie.ncl.net.pdu.DecoderException
- Throws:
ie.ncl.net.pdu.DecoderException
main
public static void main(java.lang.String[] args)