Revision 13044 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/writers/dbf/DbfWriter.java
DbfWriter.java | ||
---|---|---|
17 | 17 |
import com.iver.cit.gvsig.fmap.drivers.ITableDefinition; |
18 | 18 |
import com.iver.cit.gvsig.fmap.drivers.shp.DbaseFileHeaderNIO; |
19 | 19 |
import com.iver.cit.gvsig.fmap.drivers.shp.DbaseFileWriterNIO; |
20 |
import com.iver.cit.gvsig.fmap.drivers.shp.SHP; |
|
20 | 21 |
import com.iver.cit.gvsig.fmap.edition.IRowEdited; |
21 | 22 |
import com.iver.cit.gvsig.fmap.edition.fieldmanagers.AddFieldCommand; |
22 | 23 |
import com.iver.cit.gvsig.fmap.edition.fieldmanagers.FieldCommand; |
... | ... | |
49 | 50 |
} |
50 | 51 |
|
51 | 52 |
public void setFile(File f) { |
52 |
String strFichDbf = f.getAbsolutePath().replaceAll("\\.shp", ".dbf"); |
|
53 |
dbfPath = strFichDbf.replaceAll("\\.SHP", ".DBF"); |
|
53 |
String absolutePath=f.getAbsolutePath(); |
|
54 |
if (absolutePath.toUpperCase().endsWith("DBF")){ |
|
55 |
dbfPath=absolutePath; |
|
56 |
} else { |
|
57 |
dbfPath = SHP.getDbfFile(f).getAbsolutePath(); |
|
58 |
} |
|
54 | 59 |
} |
55 | 60 |
|
56 | 61 |
private WritableByteChannel getWriteChannel(String path) throws IOException { |
Also available in: Unified diff