de.smartics.html5.jatl
Class HtmlFactory

Package class diagram package HtmlFactory
java.lang.Object
  extended by de.smartics.html5.jatl.HtmlFactory

@ApplicationScoped
public class HtmlFactory
     
     
extends Object

Factory to create HTML instances for the creation of HTML documents with Html.


Constructor Summary
HtmlFactory()
           
 
Method Summary
 Html create(OutputStream output)
          Creates the Html instance based on the properties set to the factory.
 int getBufferSize()
          Returns the size of the buffer to write to.
 Charset getCharset()
          Returns the character set to use.
 void setBufferSize(int bufferSize)
          Sets the size of the buffer to write to.
 void setCharset(Charset charset)
          Sets the character set to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlFactory

public HtmlFactory()
Method Detail

getBufferSize

public int getBufferSize()
Returns the size of the buffer to write to.

The default is set to 8192.

Returns:
the size of the buffer to write to.

setBufferSize

public void setBufferSize(int bufferSize)
                   throws IllegalArgumentException
Sets the size of the buffer to write to.

The default is set to 8192.

Parameters:
bufferSize - the size of the buffer to write to.
Throws:
IllegalArgumentException - if buffer size is zero or less.

getCharset

public Charset getCharset()
Returns the character set to use.

The default is set to UTF-8.

Returns:
the character set to use.

setCharset

public void setCharset(Charset charset)
                throws NullPointerException
Sets the character set to use.

The default is set to UTF-8.

Parameters:
charset - the character set to use.
Throws:
NullPointerException - if charset is null.

create

public Html create(OutputStream output)
            throws NullPointerException
Creates the Html instance based on the properties set to the factory.

Parameters:
output - the output to write to.
Returns:
the Html instance.
Throws:
NullPointerException - if output is null.


Copyright © 2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.