return csb.getInputStream();
}
private InputStream wrapInHtml(final List<DebugInfo> parts) throws IOException {
StringWriter writer = new StringWriter();
PathInfo pathInfo = null;
try {
pathInfo = context.getPathInfo();
} catch (final ODataException e) {}
writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n")
.append(" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n")
.append("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n")
.append("<head>\n")
.append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n")
.append("<title>")
.append(pathInfo == null ? "" :
escapeHtml(pathInfo.getServiceRoot().relativize(pathInfo.getRequestUri()).getPath()))
.append("</title>\n")
.append("<style type=\"text/css\">\n")
.append("body { font-family: Arial, sans-serif; font-size: 13px;\n")
.append(" line-height: 16px; margin: 0;\n")
.append(" background-color: #eeeeee; color: #333333; }\n")