|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.protocols.smpp.message.param.AbstractDescriptor
org.mobicents.protocols.smpp.message.param.BytesParamDescriptor
public class BytesParamDescriptor
| Constructor Summary | |
|---|---|
BytesParamDescriptor()
|
|
BytesParamDescriptor(int linkIndex)
|
|
| Method Summary | |
|---|---|
int |
getLengthSpecifier()
Get the index of another numerical mandatory parameter which specifies the length of the parameter this descriptor represents. |
Object |
readObject(PacketDecoder decoder,
int length)
Read an object from a byte array. |
int |
sizeOf(Object obj)
Get the encoded byte-size of obj. |
void |
writeObject(Object obj,
PacketEncoder encoder)
Write the specified object to an output stream. |
| Methods inherited from class org.mobicents.protocols.smpp.message.param.AbstractDescriptor |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BytesParamDescriptor()
public BytesParamDescriptor(int linkIndex)
| Method Detail |
|---|
public int getLengthSpecifier()
ParamDescriptorAs another example, take the submit_multi packet. It has a mandatory parameter called dest_address(es) which specify all the destinations the message should be submitted to. The number of destinations in the destination table is specified by the number_of_dests mandatory parameter. In this case, the descriptor used to read the dest_addresses would return the index of number_of_dests from this method.
-1 must be returned.public int sizeOf(Object obj)
ParamDescriptorobj.
obj - The object to calculate the encoded size for.
#writeObject(Object, OutputStream) method.
public void writeObject(Object obj,
PacketEncoder encoder)
throws IOException
ParamDescriptor
obj - The object to encode.
IOException - If there was an error writing to the stream.
public Object readObject(PacketDecoder decoder,
int length)
ParamDescriptor
length - The number of bytes to use in reading the object. If the
length is unknown and intrinsic to the type being decoded (such as
a C-String, which is terminated by a nul-byte), then -1
may be supplied.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||