OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 693... Line 693...
693
     * @return a writer with the same encoding as the XML.
693
     * @return a writer with the same encoding as the XML.
694
     * @throws IOException if an error occurs.
694
     * @throws IOException if an error occurs.
695
     * @see StreamUtils#createXMLWriter(java.io.OutputStream)
695
     * @see StreamUtils#createXMLWriter(java.io.OutputStream)
696
     */
696
     */
697
    public static BufferedWriter createXMLWriter(final File f) throws IOException {
697
    public static BufferedWriter createXMLWriter(final File f) throws IOException {
-
 
698
        FileUtils.mkParentDirs(f);
698
        final FileOutputStream outs = new FileOutputStream(f);
699
        final FileOutputStream outs = new FileOutputStream(f);
699
        try {
700
        try {
700
            return StreamUtils.createXMLWriter(outs);
701
            return StreamUtils.createXMLWriter(outs);
701
        } catch (RuntimeException e) {
702
        } catch (RuntimeException e) {
702
            outs.close();
703
            outs.close();