|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectie.omk.smpp.message.tlv.StringEncoder
public class StringEncoder
Value encoder for string types. Operates on the java.lang.String type.
Constructor Summary | |
---|---|
StringEncoder()
Create a new StringEncoder. |
Method Summary | |
---|---|
int |
getValueLength(Tag tag,
Object value)
Calculate the length, in bytes, that the value will encode as. |
Object |
readFrom(Tag tag,
byte[] b,
int offset,
int length)
Decode a value from a byte array. |
void |
writeTo(Tag tag,
Object value,
byte[] b,
int offset)
Encode a value to a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringEncoder()
Method Detail |
---|
public void writeTo(Tag tag, Object value, byte[] b, int offset)
Encoder
writeTo
in interface Encoder
tag
- The tag of the value to encode.value
- The value to encode.b
- The byte array to encode the value to.offset
- The offset within b
to begin encoding from.public Object readFrom(Tag tag, byte[] b, int offset, int length)
Encoder
readFrom
in interface Encoder
tag
- The tag of the value to decode.b
- The byte array to decode the value from.offset
- The offset in b
to begin decoding from.length
- The length of the value to decode.
public int getValueLength(Tag tag, Object value)
Encoder
writeTo
will attempt to encode to a byte array.
getValueLength
in interface Encoder
tag
- The tag of the value to get the length for.value
- The value to get the length for.
value
will encode to in bytes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |