Revision 46627 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVFeatureWriter.java
CSVFeatureWriter.java | ||
---|---|---|
117 | 117 |
|
118 | 118 |
public void begin() { |
119 | 119 |
try { |
120 |
this.writer = new FileWriter(file); |
|
120 |
FileOutputStream fos = new FileOutputStream(file, false); |
|
121 |
if (this.charset != null) { |
|
122 |
this.writer = new OutputStreamWriter(fos, this.charset); |
|
123 |
} else { |
|
124 |
this.writer = new OutputStreamWriter(fos); |
|
125 |
} |
|
121 | 126 |
} catch (IOException e) { |
122 | 127 |
LOGGER.warn("Can't open file for write (" + file.getAbsolutePath() + ").", e); |
123 | 128 |
throw new RuntimeException(e); |
Also available in: Unified diff