submit.addOptionalParameter(new Tlv(SmppConstants.TAG_MESSAGE_PAYLOAD, textBytes, "message_payload")); } else {
protected int calculateByteSizeOfOptionalParameters() { if (this.optionalParameters == null) { return 0; } int optParamLength = 0; // otherwise, add length of each tlv for (Tlv tlv : this.optionalParameters) { optParamLength += tlv.calculateByteSize(); } return optParamLength; }
/** * Returns the size of this TLV in bytes. Basically, its always 4 bytes * plus the length of the value. Two bytes for tag and two byte for length * and then the length of the value itself. Primarily used for encoding * the PDU. * @return */ public int calculateByteSize() { return 4 + getUnsignedLength(); }
public String getValueAsString() throws TlvConvertException { return getValueAsString("ISO-8859-1"); }
protected int findOptionalParameter(short tag) { if (this.optionalParameters == null) { return -1; } int i = 0; for (Tlv tlv : this.optionalParameters) { if (tlv.getTag() == tag) { return i; } i++; } // if we get here, we didn't find the parameter by tag return -1; }
public String getValueAsString() throws TlvConvertException { return getValueAsString("ISO-8859-1"); }
protected int findOptionalParameter(short tag) { if (this.optionalParameters == null) { return -1; } int i = 0; for (Tlv tlv : this.optionalParameters) { if (tlv.getTag() == tag) { return i; } i++; } // if we get here, we didn't find the parameter by tag return -1; }
/** * Returns the size of this TLV in bytes. Basically, its always 4 bytes * plus the length of the value. Two bytes for tag and two byte for length * and then the length of the value itself. Primarily used for encoding * the PDU. * @return */ public int calculateByteSize() { return 4 + getUnsignedLength(); }
protected int calculateByteSizeOfOptionalParameters() { if (this.optionalParameters == null) { return 0; } int optParamLength = 0; // otherwise, add length of each tlv for (Tlv tlv : this.optionalParameters) { optParamLength += tlv.calculateByteSize(); } return optParamLength; }
public String getValueAsString() throws TlvConvertException { return getValueAsString("ISO-8859-1"); }
protected int findOptionalParameter(short tag) { if (this.optionalParameters == null) { return -1; } int i = 0; for (Tlv tlv : this.optionalParameters) { if (tlv.getTag() == tag) { return i; } i++; } // if we get here, we didn't find the parameter by tag return -1; }
/** * Returns the size of this TLV in bytes. Basically, its always 4 bytes * plus the length of the value. Two bytes for tag and two byte for length * and then the length of the value itself. Primarily used for encoding * the PDU. * @return */ public int calculateByteSize() { return 4 + getUnsignedLength(); }
protected int calculateByteSizeOfOptionalParameters() { if (this.optionalParameters == null) { return 0; } int optParamLength = 0; // otherwise, add length of each tlv for (Tlv tlv : this.optionalParameters) { optParamLength += tlv.calculateByteSize(); } return optParamLength; }
public String getValueAsString() throws TlvConvertException { return getValueAsString("ISO-8859-1"); }
/** * Returns the size of this TLV in bytes. Basically, its always 4 bytes * plus the length of the value. Two bytes for tag and two byte for length * and then the length of the value itself. Primarily used for encoding * the PDU. * @return */ public int calculateByteSize() { return 4 + getUnsignedLength(); }
protected int calculateByteSizeOfOptionalParameters() { if (this.optionalParameters == null) { return 0; } int optParamLength = 0; // otherwise, add length of each tlv for (Tlv tlv : this.optionalParameters) { optParamLength += tlv.calculateByteSize(); } return optParamLength; }
public short getLength() { return (short)getUnsignedLength(); }
public short getLength() { return (short)getUnsignedLength(); }
public short getLength() { return (short)getUnsignedLength(); }
public short getLength() { return (short)getUnsignedLength(); }