001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.html; 018 019import java.io.*; 020 021/** 022 * Utility class for creating custom HTML. 023 * 024 * <h5 class='section'>Example:</h5> 025 * <p class='bjson'> 026 * String <jv>table</jv> = <jk>new</jk> SimpleHtmlWriter().sTag(<js>"table"</js>).sTag(<js>"tr"</js>).sTag(<js>"td"</js>) 027 * .append(<js>"hello"</js>).eTag(<js>"td"</js>).eTag(<js>"tr"</js>).eTag(<js>"table"</js>).toString(); 028 * </p> 029 * 030 * <h5 class='section'>See Also:</h5><ul> 031 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/HtmlBasics">HTML Basics</a> 032 033 * </ul> 034 */ 035public class SimpleHtmlWriter extends HtmlWriter { 036 037 /** 038 * Constructor. 039 */ 040 public SimpleHtmlWriter() { 041 super(new StringWriter(), true, 100, false, '\'', null); 042 } 043 044 @Override /* Object */ 045 public String toString() { 046 return out.toString(); 047 } 048}