} else if (mailItem instanceof WikiItem) { handleWiki(context, (WikiItem)mailItem);
} else if (item instanceof WikiItem) { handleWiki(context, (WikiItem) item);
    public void format(Context context, MailItem item) throws IOException, ServiceException, UserServletException, ServletException {        if (context.sync && !context.hasPart()) {            // for sync, return metadata as headers to avoid extra SOAP round-trips            context.resp.addHeader("X-Zimbra-Tags", item.getTagString());            context.resp.addHeader("X-Zimbra-Flags", item.getFlagString());            context.resp.addHeader("X-Zimbra-Received", Long.toString(item.getDate()));            if (item.getChangeDate() != item.getDate())                context.resp.addHeader("X-Zimbra-Modified", Long.toString(item.getChangeDate()));        }        try {            if (item instanceof Message) {                handleMessage(context, (Message) item);            } else if (item instanceof Appointment) {                handleAppt(context, (Appointment) item);            } else if (mailItem instanceof WikiItem) {                handleWiki(context, (WikiItem)mailItem);            } else {                throw UserServletException.notImplemented("can only handle messages/appts");            }        } catch (MessagingException me) {            throw ServiceException.FAILURE(me.getMessage(), me);        }    }