Revision 44648 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.shp/src/main/java/org/gvsig/fmap/dal/store/shp/utils/SHPFileWrite.java
SHPFileWrite.java | ||
---|---|---|
24 | 24 |
package org.gvsig.fmap.dal.store.shp.utils; |
25 | 25 |
|
26 | 26 |
import java.io.IOException; |
27 |
import java.nio.Buffer; |
|
27 | 28 |
import java.nio.ByteBuffer; |
28 | 29 |
import java.nio.ByteOrder; |
29 | 30 |
import java.nio.channels.FileChannel; |
... | ... | |
172 | 173 |
allocateBuffers(); |
173 | 174 |
} |
174 | 175 |
// Posicionamos al principio. |
175 |
m_bb.position(0);
|
|
176 |
m_indexBuffer.position(0);
|
|
176 |
((Buffer)m_bb).position(0);
|
|
177 |
((Buffer)m_indexBuffer).position(0);
|
|
177 | 178 |
|
178 | 179 |
ShapeFileHeader2 header = new ShapeFileHeader2(); |
179 | 180 |
|
... | ... | |
239 | 240 |
} |
240 | 241 |
} |
241 | 242 |
|
242 |
m_pos = m_bb.position();
|
|
243 |
m_pos = ((Buffer)m_bb).position();
|
|
243 | 244 |
try { |
244 | 245 |
m_shape.initialize(g); |
245 | 246 |
} catch (BaseException e) { |
... | ... | |
259 | 260 |
m_bb.putInt(m_shape.getShapeType()); |
260 | 261 |
m_shape.write(m_bb); |
261 | 262 |
|
262 |
m_pos = m_bb.position();
|
|
263 |
m_pos = ((Buffer)m_bb).position();
|
|
263 | 264 |
|
264 | 265 |
// write to the shx |
265 | 266 |
m_indexBuffer.putInt(m_offset); |
Also available in: Unified diff