|
@@ -5,7 +5,6 @@ import com.qmth.ops.biz.domain.PropertyItem;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
import java.io.OutputStream;
|
|
|
-import java.io.PrintStream;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
import java.util.Properties;
|
|
@@ -13,12 +12,12 @@ import java.util.Set;
|
|
|
|
|
|
public class PropertyFileUtil {
|
|
|
|
|
|
- public static void write(List<PropertyItem> propertyList, OutputStream ous) throws IOException {
|
|
|
+ public static void write(List<PropertyItem> propertyList, OutputStream ous, String comment) throws IOException {
|
|
|
Properties p = new Properties();
|
|
|
for (PropertyItem item : propertyList) {
|
|
|
p.put(item.getKey(), item.getValue());
|
|
|
}
|
|
|
- p.list(new PrintStream(ous));
|
|
|
+ p.store(ous, comment);
|
|
|
}
|
|
|
|
|
|
public static List<PropertyItem> read(InputStream ins) throws IOException {
|