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

## Class HtmlGeneratorFactory.HtmlGenerator

- java.lang.Object
- - org.apache.sling.rewriter.impl.components.HtmlGeneratorFactory.HtmlGenerator

All Implemented Interfaces:
  `Generator`

Enclosing class:
  HtmlGeneratorFactory

    public static final class HtmlGeneratorFactory.HtmlGenerator
    extends Object
    implements Generator

### Constructor Summary

Constructors
`HtmlGenerator​(org.apache.sling.commons.html.HtmlParser parser)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `dispose()` Dispose the generator.
`void` `finished()` Notify the generator that parsing is finished.
`PrintWriter` `getWriter()` Get the writer to write the output to.
`void` `init​(ProcessingContext context, ProcessingComponentConfiguration config)` Initialize this component.
`void` `setContentHandler​(ContentHandler handler)` Set the content handler the generator should stream to.

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

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

### Constructor Detail

#### HtmlGenerator

    public HtmlGenerator​(org.apache.sling.commons.html.HtmlParser parser)

### Method Detail

#### finished

    public void finished()
                  throws IOException,
                         SAXException

Description copied from interface: `Generator`
Notify the generator that parsing is finished.

Specified by:
  `finished` in interface `Generator`
Throws:
  `IOException` - IOException
  `SAXException` - SAXException
See Also:
  `Generator.finished()`

#### getWriter

    public PrintWriter getWriter()

Description copied from interface: `Generator`
Get the writer to write the output to.

Specified by:
  `getWriter` in interface `Generator`
Returns:
  A print writer.
See Also:
  `Generator.getWriter()`

#### init

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

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

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

#### setContentHandler

    public void setContentHandler​(ContentHandler handler)

Description copied from interface: `Generator`
Set the content handler the generator should stream to.

Specified by:
  `setContentHandler` in interface `Generator`
Parameters:
  `handler` - A transformer or serializer.
See Also:
  `Generator.setContentHandler(org.xml.sax.ContentHandler)`

#### dispose

    public void dispose()

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

Specified by:
  `dispose` in interface `Generator`
See Also:
  `Generator.dispose()`