class DefaultModelWriter implements ModelWriter {

    @Override
    public void write(File output, Map<String, Object> options, Model model) throws IOException {
        Objects.requireNonNull(output, "output cannot be null");
        Objects.requireNonNull(model, "model cannot be null");

        output.getParentFile().mkdirs();

        write(new XmlStreamWriter(Files.newOutputStream(output.toPath())), options, model);
    }

    @Override
    public void write(Writer output, Map<String, Object> options, Model model) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public void write(OutputStream output, Map<String, Object> options, Model model) throws IOException {
        Objects.requireNonNull(output, "output cannot be null");
        Objects.requireNonNull(model, "model cannot be null");

        String encoding = model.getModelEncoding();
        if (encoding == null || encoding.isEmpty()) {
            encoding = "UTF-8";
        }

        try (Writer out = new OutputStreamWriter(output, encoding)) {
            write(out, options, model);
        }
    }

    @Override
    public void write(File output, Map<String, Object> options, org.apache.maven.model.Model model) throws IOException {
        write(output, options, model.getDelegate());
    }

    @Override
    public void write(Writer output, Map<String, Object> options, org.apache.maven.model.Model model)
            throws IOException {
        write(output, options, model.getDelegate());
    }

    @Override
    public void write(OutputStream output, Map<String, Object> options, org.apache.maven.model.Model model)
            throws IOException {
        write(output, options, model.getDelegate());
    }
}

        Objects.requireNonNull(output, "output cannot be null");
        Objects.requireNonNull(model, "model cannot be null");

        try (Writer out = output) {
            new MavenStaxWriter().write(out, model);
        } catch (XMLStreamException e) {
            throw new IOException(e);
        }
    
<no_super_class>