ByteArrayInputStream bais = new ByteArrayInputStream(html.getBytes());
ByteArrayInputStream bais = new ByteArrayInputStream(html.getBytes("utf-8"));
    static void sendbackDefangedHtml(MimePart mp, String contentType, HttpServletResponse resp, String fmt)     throws IOException, MessagingException {        resp.setContentType(contentType);        InputStream is = null;        try {            is = mp.getInputStream();            String html = HtmlDefang.defang(is, FORMAT_DEFANGED_HTML.equals(fmt));            ByteArrayInputStream bais = new ByteArrayInputStream(html.getBytes());            ByteUtil.copy(bais, resp.getOutputStream());        } finally {            if (is != null)                is.close();        }	}