# Class SHTMLWriter

java.lang.Object
javax.swing.text.AbstractWriter
javax.swing.text.html.HTMLWriter
com.lightdev.app.shtm.SHTMLWriter

public class SHTMLWriter extends HTMLWriter
FixedHTMLWriter

## Field Summary

### Fields inherited from class AbstractWriter

`NEWLINE`

## Constructor Summary

Constructors
Constructor
Description
`SHTMLWriter(Writer w, HTMLDocument doc)`
`SHTMLWriter(Writer w, HTMLDocument doc, int pos, int len)`
`SHTMLWriter(HTMLDocument doc)`
Constructs the SHTMLWriter with a new StringWriter.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`closeOutUnwantedEmbeddedTags(AttributeSet attr)`
`protected void`
`endTag(Element elem)`
`protected String`
`entity(char c)`
`protected ElementIterator`
`getElementIterator()`
`protected void`
`indent()`
`protected void`
`output(char[] chars, int start, int length)`
`protected void`
`startTag(Element elem)`
`protected void`
`text(Element elem)`
`protected void`
`textAreaContent(AttributeSet attr)`
`String`
`toString()`
`void`
`write()`
`void`
`write(String string)`
`protected void`
`writeAttributes(AttributeSet attributeSet)`
`void`
`writeChildElements(Element parentElement)`
invoke HTML creation for all children of a given element.
`protected void`
`writeEmbeddedTags(AttributeSet attr)`
`protected void`
`writeLineSeparator()`

### Methods inherited from class HTMLWriter

`comment, emptyTag, isBlockTag, matchNameAttribute, selectContent, synthesizedElement, writeOption`

### Methods inherited from class AbstractWriter

`decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, inRange, isLineEmpty, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SHTMLWriter

public SHTMLWriter(Writer w, HTMLDocument doc, int pos, int len)

### SHTMLWriter

public SHTMLWriter(HTMLDocument doc)
Constructs the SHTMLWriter with a new StringWriter. See also the method getWrittenString.

### SHTMLWriter

public SHTMLWriter(Writer w, HTMLDocument doc)

## Method Details

### getElementIterator

protected ElementIterator getElementIterator()

Overrides:
  `getElementIterator` in class `AbstractWriter`

### output

protected void output(char[] chars, int start, int length) throws IOException

Overrides:
  `output` in class `HTMLWriter`
Throws:
  `IOException`

### entity

protected String entity(char c)

### startTag

protected void startTag(Element elem) throws IOException, BadLocationException

Overrides:
  `startTag` in class `HTMLWriter`
Throws:
  `IOException`
  `BadLocationException`

### endTag

protected void endTag(Element elem) throws IOException

Overrides:
  `endTag` in class `HTMLWriter`
Throws:
  `IOException`

### text

protected void text(Element elem) throws BadLocationException, IOException

Overrides:
  `text` in class `HTMLWriter`
Throws:
  `BadLocationException`
  `IOException`

### textAreaContent

protected void textAreaContent(AttributeSet attr) throws BadLocationException, IOException

Overrides:
  `textAreaContent` in class `HTMLWriter`
Throws:
  `BadLocationException`
  `IOException`

### write

public void write() throws IOException, BadLocationException

Overrides:
  `write` in class `HTMLWriter`
Throws:
  `IOException`
  `BadLocationException`

### writeLineSeparator

protected void writeLineSeparator() throws IOException

Overrides:
  `writeLineSeparator` in class `HTMLWriter`
Throws:
  `IOException`

### indent

protected void indent() throws IOException

Overrides:
  `indent` in class `AbstractWriter`
Throws:
  `IOException`

### writeChildElements

public void writeChildElements(Element parentElement) throws IOException, BadLocationException
invoke HTML creation for all children of a given element.

Parameters:
  `parentElement` - the element which children are to be written as HTML
Throws:
  `IOException`
  `BadLocationException`

### writeAttributes

protected void writeAttributes(AttributeSet attributeSet) throws IOException

Overrides:
  `writeAttributes` in class `HTMLWriter`
Throws:
  `IOException`

### write

public void write(String string) throws IOException

Overrides:
  `write` in class `AbstractWriter`
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### writeEmbeddedTags

protected void writeEmbeddedTags(AttributeSet attr) throws IOException

Overrides:
  `writeEmbeddedTags` in class `HTMLWriter`
Throws:
  `IOException`

### closeOutUnwantedEmbeddedTags

protected void closeOutUnwantedEmbeddedTags(AttributeSet attr) throws IOException

Overrides:
  `closeOutUnwantedEmbeddedTags` in class `HTMLWriter`
Throws:
  `IOException`