Class Plain2HtmlConverter
java.lang.Object
ch.tocco.nice2.conversion.impl.plain2html.Plain2HtmlConverter
- All Implemented Interfaces:
ConverterEngine<SimpleConverterConfig>
@Component
public class Plain2HtmlConverter
extends Object
implements ConverterEngine<SimpleConverterConfig>
A simple converter to convert plain text to html code (linebreaks and escaping).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
convert
(SimpleConverterConfig config) Convert the InputStream to the desired format and write to the provided OutputStream.getName()
Returns the name of the converter enginegetNewConverterConfig
(InputStream source, OutputStream target) get a new converter config object for this engine
-
Constructor Details
-
Plain2HtmlConverter
public Plain2HtmlConverter()
-
-
Method Details
-
getName
Description copied from interface:ConverterEngine
Returns the name of the converter engine- Specified by:
getName
in interfaceConverterEngine<SimpleConverterConfig>
-
convert
Description copied from interface:ConverterEngine
Convert the InputStream to the desired format and write to the provided OutputStream.- Specified by:
convert
in interfaceConverterEngine<SimpleConverterConfig>
- Parameters:
config
- config object obtained fromConverterEngine.getNewConverterConfig(InputStream, OutputStream)
- Throws:
ConversionException
- -
-
getNewConverterConfig
Description copied from interface:ConverterEngine
get a new converter config object for this engine- Specified by:
getNewConverterConfig
in interfaceConverterEngine<SimpleConverterConfig>
- Parameters:
source
- the source to be convertedtarget
- the target to write to- Returns:
- a converter config object
-