1 48 49 package com.caucho.hessian.io; 50 51 import java.io.IOException ; 52 import java.util.Calendar ; 53 54 57 public class CalendarSerializer extends AbstractSerializer { 58 private static CalendarSerializer SERIALIZER = new CalendarSerializer(); 59 60 public static CalendarSerializer create() 61 { 62 return SERIALIZER; 63 } 64 65 public void writeObject(Object obj, AbstractHessianOutput out) 66 throws IOException  67 { 68 if (obj == null) 69 out.writeNull(); 70 else { 71 Calendar cal = (Calendar ) obj; 72 73 out.writeObject(new CalendarHandle(cal.getClass(), 74 cal.getTimeInMillis())); 75 } 76 } 77 } 78 | Popular Tags |