Package org.apache.sling.rewriter.impl.components

## Class Html5Serializer

- java.lang.Object
- - org.apache.sling.rewriter.impl.components.Html5Serializer

All Implemented Interfaces:
  `Serializer`, `ContentHandler`

    public class Html5Serializer
    extends Object
    implements Serializer

Serializer for writing HTML5 compliant markup

### Constructor Summary

Constructors
`Html5Serializer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `characters​(char[] buffer, int offset, int length)`
`void` `dispose()` Dispose the serializer.
`void` `endDocument()`
`void` `endElement​(String uri, String localName, String qName)`
`void` `endPrefixMapping​(String s)`
`void` `ignorableWhitespace​(char[] ac, int i, int j)`
`void` `init​(ProcessingContext context, ProcessingComponentConfiguration config)` Initialize this component.
`void` `processingInstruction​(String s, String s1)`
`void` `setDocumentLocator​(Locator locator1)`
`void` `skippedEntity​(String s)`
`void` `startDocument()`
`void` `startElement​(String uri, String localName, String qName, Attributes atts)`
`void` `startPrefixMapping​(String s, String s1)`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### Html5Serializer

    public Html5Serializer()

### Method Detail

#### characters

    public void characters​(char[] buffer,
                           int offset,
                           int length)
                    throws SAXException

Specified by:
  `characters` in interface `ContentHandler`
Throws:
  `SAXException`

#### dispose

    public void dispose()

Description copied from interface: `Serializer`
Dispose the serializer. This method is always invoked by the rewriter in order to allow the serializer to release any resources etc. After this method has been called the instance is considered unusable.

Specified by:
  `dispose` in interface `Serializer`

#### endDocument

    public void endDocument()
                     throws SAXException

Specified by:
  `endDocument` in interface `ContentHandler`
Throws:
  `SAXException`

#### endElement

    public void endElement​(String uri,
                           String localName,
                           String qName)
                    throws SAXException

Specified by:
  `endElement` in interface `ContentHandler`
Throws:
  `SAXException`

#### endPrefixMapping

    public void endPrefixMapping​(String s)
                          throws SAXException

Specified by:
  `endPrefixMapping` in interface `ContentHandler`
Throws:
  `SAXException`

#### ignorableWhitespace

    public void ignorableWhitespace​(char[] ac,
                                    int i,
                                    int j)
                             throws SAXException

Specified by:
  `ignorableWhitespace` in interface `ContentHandler`
Throws:
  `SAXException`

#### init

    public void init​(ProcessingContext context,
                     ProcessingComponentConfiguration config)
              throws IOException

Description copied from interface: `Serializer`
Initialize this component.

Specified by:
  `init` in interface `Serializer`
Parameters:
  `context` - The invocation context.
  `config` - The configuration for this component.
Throws:
  `IOException` - in case of problems

#### processingInstruction

    public void processingInstruction​(String s,
                                      String s1)
                               throws SAXException

Specified by:
  `processingInstruction` in interface `ContentHandler`
Throws:
  `SAXException`

#### setDocumentLocator

    public void setDocumentLocator​(Locator locator1)

Specified by:
  `setDocumentLocator` in interface `ContentHandler`

#### skippedEntity

    public void skippedEntity​(String s)
                       throws SAXException

Specified by:
  `skippedEntity` in interface `ContentHandler`
Throws:
  `SAXException`

#### startDocument

    public void startDocument()
                       throws SAXException

Specified by:
  `startDocument` in interface `ContentHandler`
Throws:
  `SAXException`

#### startElement

    public void startElement​(String uri,
                             String localName,
                             String qName,
                             Attributes atts)
                      throws SAXException

Specified by:
  `startElement` in interface `ContentHandler`
Throws:
  `SAXException`

#### startPrefixMapping

    public void startPrefixMapping​(String s,
                                   String s1)
                            throws SAXException

Specified by:
  `startPrefixMapping` in interface `ContentHandler`
Throws:
  `SAXException`