2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 import java
.io
.FileWriter
;
24 public class LISTOutputter
30 * ls is the current line separator (carridge return)
34 public static LISTOutputter
create( String _sOutputPath
, String _sFilename
)
36 FileHelper
.makeDirectories("", _sOutputPath
);
37 LISTOutputter a
= new LISTOutputter();
38 String fs
= System
.getProperty("file.separator");
39 String sFilename
= _sOutputPath
+ fs
+ _sFilename
;
43 File outputFile
= new File(sFilename
);
44 a
.m_aOut
= new FileWriter(outputFile
.toString());
45 a
.ls
= System
.getProperty("line.separator");
47 catch (java
.io
.IOException e
)
50 GlobalLogWriter
.get().println("ERROR: Can't create LIST Outputter");
53 a
.m_sFilename
= sFilename
;
57 public String
getFilename() {return m_sFilename
;}
59 public void createHeader()
63 m_aOut
.write("# This file is automatically created by a convwatch run" + ls
);
64 m_aOut
.write("# " + ls
);
66 catch (java
.io
.IOException e
)
71 public void writeValue(String _sValue
)
75 m_aOut
.write(_sValue
+ ls
);
78 catch (java
.io
.IOException e
)
90 catch (java
.io
.IOException e
)