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 LongType
    14      extends Type
    15  {
    16      public Object readObject(MessageReader reader, MessageContext context)
    17      {
    18          return new Long( reader.getValueAsLong() );
    19      }
    20
    21      public void writeObject(Object object, MessageWriter writer, MessageContext context)
    22      {
    23          writer.writeValueAsLong( (Long) object );
    24      }
    25  }