1 package org.codehaus.xfire.java.type; 2 3 import java.util.Calendar; 4 5 import org.codehaus.xfire.java.message.MessageReader; 6 import org.codehaus.xfire.java.message.MessageWriter; 7 8 /*** 9 * Type for the Calendar class. 10 * 11 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 12 */ 13 public class CalendarType 14 extends Type 15 { 16 /*** 17 * @see org.codehaus.xfire.java.type.Type#readObject(org.dom4j.Element) 18 */ 19 public Object readObject(MessageReader reader) 20 { 21 return reader.getValueAsCalendar(); 22 } 23 24 /*** 25 * @see org.codehaus.xfire.java.type.Type#writeObject(java.lang.Object) 26 */ 27 public void writeObject(Object object, MessageWriter writer) 28 { 29 writer.writeValueAsCalendar( (Calendar) object ); 30 } 31 32 }