View Javadoc

    1   package org.codehaus.xfire.aegis.type.basic;
    2
    3   import org.codehaus.xfire.MessageContext;
    4   import org.codehaus.xfire.aegis.MessageReader;
    5   import org.codehaus.xfire.aegis.MessageWriter;
    6   import org.codehaus.xfire.aegis.type.Type;
    7
    8   /***
    9    * SimpleSerializer
    10   *
    11   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
    12   */
    13  public class FloatType
    14      extends Type
    15  {
    16
    17      public Object readObject(MessageReader reader, MessageContext context)
    18      {
    19          return new Float( reader.getValueAsFloat() );
    20      }
    21
    22      public void writeObject(Object object, MessageWriter writer, MessageContext context)
    23      {
    24          writer.writeValueAsFloat( (Float) object );
    25      }
    26  }