Encode the Sheet header

@param context
@param responseWriter
@param sheet
@throws IOException
760760
private void encodeHeader(final FacesContext context, final ResponseWriter responseWriter, final Sheet sheet)
                throws IOException {
        // header
        final UIComponent header = sheet.getFacet("header");
        if (header != null) {
            responseWriter.startElement("div", null);
            responseWriter.writeAttribute("class", "ui-datatable-header ui-widget-header ui-corner-top", null);
            header.encodeAll(context);
            responseWriter.endElement("div");
        }
    }
595779
@Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        PuiTextarea input = (PuiTextarea) component;
        writer.startElement("pui-textarea", component);
        renderNonEmptyAttribute(writer, "label", input.getLabel());
        renderNGModel(input, writer);
        renderJSR303Constraints(writer, input);
        writer.endElement("pui-textarea");
    }
275801
public void processSheet(
            StylesTable styles,
            ReadOnlySharedStringsTable strings,
            SheetContentsHandler sheetHandler,
            InputStream sheetInputStream) throws ReadExcelException {

        DataFormatter formatter = new DataFormatter();
        InputSource sheetSource = new InputSource(sheetInputStream);
        try {
            XMLReader sheetParser = SAXHelper.newXMLReader();
            ContentHandler handler = new XSSFSheetXMLHandlerPlus(
                    styles, null, strings, sheetHandler, formatter, false);
            sheetParser.setContentHandler(handler);
            //开始解析
            sheetParser.parse(sheetSource);
        } catch (ParserConfigurationException e) {
            throw new ReadExcelException("SAX parser appears to be broken - " + e.getMessage());
        } catch (Exception e) {
            throw new ReadExcelException(e.getMessage());
        }
    }
611761
private void encodeHandle(final FacesContext context, final SlideOut slideOut) throws IOException {
        final ResponseWriter writer = context.getResponseWriter();

        String styleClass = SlideOut.HANDLE_CLASS;
        if (slideOut.getHandleStyleClass() != null) {
            styleClass = styleClass + " " + slideOut.getHandleStyleClass();
        }

        writer.startElement("a", null);
        writer.writeAttribute("id", getHandleId(context, slideOut), null);
        if (slideOut.getHandleStyle() != null) {
            writer.writeAttribute("style", slideOut.getHandleStyle(), "style");
        }
        writer.writeAttribute("class", styleClass, "styleClass");

        // icon
        encodeIcon(context, slideOut);

        // handle text
        if (slideOut.getTitle() != null) {
            writer.writeText(slideOut.getTitle(), "title");
        }

        writer.endElement("a");
    }
1096087
public void exportObjects2Excel(List<?> data, List<String> header, OutputStream os)
            throws IOException {

        try (Workbook workbook = exportExcelBySimpleHandler(data, header, null, true)) {
            workbook.write(os);
        }
    }
482497
public void write(Writer out)
         throws IOException
    {
        writeHtmlHead(out);
        
        out.write("<frameset "+border);
        
        if(colSpec!=null)
            out.write(" cols=\""+colSpec+"\"");
        if(rowSpec!=null)
            out.write(" rows=\""+rowSpec+"\"");
        out.write(">");

        for(int r=0;r<rows;r++)
            for(int c=0;c<cols;c++)
                frames[c][r].write(out);

        out.write("<noframes>");
        writeElements(out);
        out.write("</noframes>");

        out.write("</frameset>");
        out.write("</html>");
    }
683686
private void encodeScript(final FacesContext context, final SlideOut slideOut) throws IOException {
        final WidgetBuilder wb = getWidgetBuilder(context);
        final String clientId = slideOut.getClientId(context);
        final String handleId = getHandleId(context, slideOut);
        wb.init("ExtSlideOut", slideOut.resolveWidgetVar(), clientId);
        wb.attr("tabLocation", slideOut.getLocation());
        wb.attr("tabHandle", handleId);
        wb.attr("speed", slideOut.getAnimateSpeed());
        wb.attr("action", StringUtils.lowerCase(slideOut.getShowOn()));
        wb.attr("clickScreenToClose", slideOut.isClickScreenToClose());
        wb.attr("onLoadSlideOut", slideOut.isAutoOpen());
        wb.attr("positioning", slideOut.isSticky() ? "absolute" : "fixed");
        wb.attr("offset", slideOut.getOffset());
        wb.attr("offsetReverse", slideOut.isOffsetReverse());
        wb.attr("handleOffsetReverse", slideOut.isHandleOffsetReverse());
        wb.attr("bounceTimes", slideOut.getBounceTimes());
        wb.attr("bounceDistance", slideOut.getBounceDistance());
        wb.nativeAttr("clickScreenToCloseFilters", "['.ui-slideouttab-panel', 'button', 'a']");

        if (slideOut.getHandleOffset() != null) {
            wb.attr("handleOffset", slideOut.getHandleOffset());
        }

        if (slideOut.getOnopen() != null) {
            wb.callback("onOpen", "function()", slideOut.getOnopen());
        }
        if (slideOut.getOnclose() != null) {
            wb.callback("onClose", "function()", slideOut.getOnclose());
        }
        if (slideOut.getOnslide() != null) {
            wb.callback("onSlide", "function()", slideOut.getOnslide());
        }
        if (slideOut.getOnbeforeopen() != null) {
            wb.callback("onBeforeOpen", "function()", slideOut.getOnbeforeopen());
        }
        if (slideOut.getOnbeforeclose() != null) {
            wb.callback("onBeforeClose", "function()", slideOut.getOnbeforeclose());
        }
        if (slideOut.getOnbeforeslide() != null) {
            wb.callback("onBeforeSlide", "function()", slideOut.getOnbeforeslide());
        }

        encodeClientBehaviors(context, slideOut);

        wb.finish();
    }
1168890
public void setHeading(String heading)
    {
	    
    	String m_heading = heading;
	    
    	String [] preCol = m_heading.split("\n");
    	String [][] cells = new String[preCol.length][this.m_columnNumber];
    	
    	
    	for(int i=0; i<preCol.length; i++)
    		cells[i] = preCol[i].split(";", this.m_columnNumber);
    	
    	for(int i=0; i<cells[0].length; i++)
    	{
    		String xhead = "";
    		for(int j=0; j<preCol.length; j++){
    			//if(cells[j][i]!=null)
    			xhead += (cells[j][i]+ " ");
    		}
    		this.m_xheading.add(xhead);
    	}
    	
    }
194567
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Label label = (Label) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = label.getClientId();
	
		boolean idHasBeenRendered = false;

		String sev = label.getSeverity();
		String txt = label.getValue();
		if (txt == null) {
			txt = label.getText();
		}

		// add responsive style
		String clazz = Responsive.getResponsiveStyleClass(label, false).trim();
		boolean isResponsive = clazz.length() > 0;
		if (isResponsive) {
			rw.startElement("div", label);
			rw.writeAttribute("class", clazz, null);
			rw.writeAttribute("id", clientId, "id");
			idHasBeenRendered = true;
		}

		rw.startElement("span", label);
		if (!idHasBeenRendered) {
			rw.writeAttribute("id", clientId, "id");
		}
		Tooltip.generateTooltip(context, label, rw);
		String sclass = "label" + " " + "label";
		if (sev != null) {
			sclass += "-" + sev;
		} else {
			sclass += "-default";
		}
		String styleClass = label.getStyleClass();
		sclass += styleClass != null ? " " + styleClass : "";
		rw.writeAttribute("class", sclass, "class");
		String style = label.getStyle();
		if (isResponsive) {
			if (null == style) {
				style = "display:block";
			} else {
				style += ";display:block";
			}
		}

		if (style != null)
			rw.writeAttribute("style", style, "style");

		rw.writeText(txt, null);
		rw.endElement("span");
		if (isResponsive) {
			rw.endElement("div");
		}

		Tooltip.activateTooltips(context, label);
	}
984038
protected void writeHeaders(HttpServletResponse response, Resource resource, long count) throws IOException
    {
        ResourceCache.ResourceMetaData metaData = _httpContext.getResourceMetaData(resource);

        response.setContentType(metaData.getMimeType());
        if (count != -1)
        {
            if (count == resource.length() && response instanceof ServletHttpResponse )
                response.setHeader(HttpFields.__ContentLength, metaData.getLength());
            else
                response.setContentLength((int) count);
        }

        response.setHeader(HttpFields.__LastModified, metaData.getLastModified());

        if (_acceptRanges)
            response.setHeader(HttpFields.__AcceptRanges, "bytes");
    }
741585
def _render_headers(self, sheet):
        
        headers = getattr(self, 'headers', ())
        labels = [header['label'] for header in headers]
        extra_headers = getattr(self, "extra_headers", ())
        labels.extend([header['label'] for header in extra_headers])
        sheet.writerow(labels)
1244061
public void noTemplateSheet2Excel(List<NoTemplateSheetWrapper> sheets, String targetPath)
            throws Excel4JException, IOException {

        try (OutputStream fos = new FileOutputStream(targetPath);
             Workbook workbook = exportExcelNoTemplateHandler(sheets, true)) {
            workbook.write(fos);
        }
    }
746512
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (FacesContext.getCurrentInstance().isPostback()) {
			ResponseWriter writer = context.getResponseWriter();
			writer.writeText("\n", null);
			writer.startElement("script", component);
			writer.write("if (window.jsfScope) {\n");
			List<String> beansAsJSon = PuiModelSync.getFacesModel();
			for (String bean : beansAsJSon) {
				writer.write("puiUpdateModel(" + bean + ");");
			}
			writer.writeText("\n}", null);
			writer.endElement("script");
		}
	}
242518
public static String encodeComponentWithSurroundingDiv(final FacesContext context,
                                                           final UIComponent component) throws IOException {
        return encodeComponentWithSurroundingDiv(context, component, null);
    }
1128031
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		DateTimePicker dtp = (DateTimePicker) component;
		ResponseWriter rw = context.getResponseWriter();

		String dateTimePickerId = encodeHTML(context, rw, dtp);
		encodeJS(context, rw, dtp, dateTimePickerId);
	}
86508
@SuppressWarnings("unchecked")
	public T setSheet(int sheetIndex) {
		try {
			this.sheet = this.workbook.getSheetAt(sheetIndex);
		} catch (IllegalArgumentException e) {
			this.sheet = this.workbook.createSheet();
		}
		if (null == this.sheet) {
			this.sheet = this.workbook.createSheet();
		}
		return (T) this;
	}
701772
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		InternalCssScriptResource internalCssScriptResource = (InternalCssScriptResource) component;
		ResponseWriter rw = context.getResponseWriter();

		rw.startElement("link", internalCssScriptResource);
		rw.writeAttribute("type", "text/css", null);
		rw.writeAttribute("rel", "stylesheet", null);
		rw.writeAttribute("href", internalCssScriptResource.getUrl(), null);

		rw.endElement("link");

	}