Skip to content

Converters code duplication

The IConverter interface (or an abstract child) should provide default implementations for these methods:

InputStream exportModelToInputStream(Model model) throws ConverterException, InconsistentModelException;

File exportModelToFile(Model model, String filePath) throws ConverterException, InconsistentModelException, IOException;

and it (or an abstract child) should provide these methods:

File stream2file(InputStream stream);

Currently the converters implement the above methods all in their own way, which is unnecessary and can lead to inconsistent behavior depending on the input file.

Edited by Sascha Herzinger