/** {@inheritDoc} */ @Override protected final synchronized void onOpen() { final ITextOutput out; StreamEncoding<?, ?> e; String s; super.onOpen(); this.getFileCollector().addFile(this.getDocumentPath(), XHTML.XHTML_1_0); out = this.getTextOutput(); out.append(_XHTML10Document.XML_HEADER_BEGIN); e = StreamEncoding.getStreamEncoding(out); if ((e == null) || (e == StreamEncoding.TEXT) || (e == StreamEncoding.BINARY)) { e = StreamEncoding.getDefaultTextEncoding(); } s = e.name(); out.append(s); out.append(_XHTML10Document.XML_HEADER_END); out.appendLineBreak(); out.append(_XHTML10Document.DOC_TYPE); out.appendLineBreak(); out.append(_XHTML10Document.HTML_BEGIN); out.append(_XHTML10Document.HEAD_BEGIN); out.append(_XHTML10Document.META_CHARSET_BEGIN); out.append(s); out.append(XHTML10Driver.EMPTY_ATTRIB_TAG_END); out.append(_XHTML10Document.META_STYLE_TYPE); out.append(_XHTML10Document.DEFAULT_CSS_LINK); out.append(_XHTML10Document.CSS_DEFAULT); out.append(XHTML10Driver.EMPTY_ATTRIB_TAG_END); out.append(_XHTML10Document.PRINT_CSS_LINK); out.append(_XHTML10Document.CSS_PRINT); out.append(XHTML10Driver.EMPTY_ATTRIB_TAG_END); }