1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.ini4j.spi;
17
18 import org.ini4j.Config;
19
20 import java.io.PrintWriter;
21 import java.io.Writer;
22
23 public class OptionsFormatter extends AbstractFormatter implements OptionsHandler
24 {
25 public static OptionsFormatter newInstance(Writer out, Config config)
26 {
27 OptionsFormatter instance = newInstance();
28
29 instance.setOutput((out instanceof PrintWriter) ? (PrintWriter) out : new PrintWriter(out));
30 instance.setConfig(config);
31
32 return instance;
33 }
34
35 public void endOptions()
36 {
37 getOutput().flush();
38 }
39
40 public void startOptions()
41 {
42 assert true;
43 }
44
45 private static OptionsFormatter newInstance()
46 {
47 return ServiceFinder.findService(OptionsFormatter.class);
48 }
49 }