return "binary";
DataSource ds = handler.getDataSource(); if (ds != null) { return getEncoding(ds); }  try {  ContentType content = new ContentType(ds.getContentType());     ContentCheckingOutputStream checker = new ContentCheckingOutputStream();  handler.writeTo(checker);   if (content.match("text/*")) { return checker.getTextTransferEncoding(); } else { return checker.getBinaryTransferEncoding(); }  } catch (Exception e) {  return "base64"; }
    public static String getEncoding(DataHandler handler) {        // TODO figure what type of data it is        return "binary";    }