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