|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.echomine.xmlrpc.IntSerializer
public class IntSerializer
A serializer for integer types. It can be used to serialize both the <int> and the <i4> elements. Each one should be registered by the caller just in case either one is used. Example:
<int>64</int> <i4>128</i4>
| Constructor Summary | |
|---|---|
IntSerializer(java.lang.String name)
accepts the name of the element to use (ie. |
|
| Method Summary | |
|---|---|
java.lang.Object |
deserialize(Element elem)
Deserializes the element into an Integer value. |
java.lang.String |
getName()
|
Element |
serialize(java.lang.Object data,
Namespace ns)
serializes the data which can be a Number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntSerializer(java.lang.String name)
| Method Detail |
|---|
public Element serialize(java.lang.Object data,
Namespace ns)
serialize in interface Serializerdata - an object of type Numberns - optional namespace, null if there is no namespace
java.lang.IllegalArgumentException - when the data is not an accepted formatpublic java.lang.Object deserialize(Element elem)
deserialize in interface Deserializerelem - the element containing the data
java.lang.NumberFormatException - if the contained data does not contain a parsable integer valuepublic java.lang.String getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||