code: @Override
      public Object writeReplace(Object obj)
      {
          Calendar cal = (Calendar) obj;
  
          return new CalendarHandle(cal.getClass(), cal.getTimeInMillis());
      }
docs: java.util.Calendar serializes to com.caucho.hessian.io.CalendarHandle