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.dbf/src/main/java/org/gvsig/fmap/dal/store/dbf/utils/DbaseFileHeader.java
DbaseFileHeader.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import java.io.IOException; |
27 | 27 |
import java.io.UnsupportedEncodingException; |
28 |
import java.nio.Buffer; |
|
28 | 29 |
import java.nio.ByteBuffer; |
29 | 30 |
import java.nio.ByteOrder; |
30 | 31 |
import java.nio.channels.FileChannel; |
... | ... | |
717 | 718 |
buffer.putShort((short) myRecordLength); |
718 | 719 |
|
719 | 720 |
// write the reserved bytes in the header |
720 |
buffer.position(buffer.position() + 17);
|
|
721 |
((Buffer)buffer).position(((Buffer)buffer).position() + 17);
|
|
721 | 722 |
|
722 | 723 |
// write the language id |
723 | 724 |
buffer.put((byte)getLanguageID()); |
724 | 725 |
|
725 | 726 |
// write the reserved bytes in the header |
726 |
buffer.position(buffer.position() + 2);
|
|
727 |
((Buffer)buffer).position(((Buffer)buffer).position() + 2);
|
|
727 | 728 |
|
728 | 729 |
// write all of the header records |
729 | 730 |
int tempOffset = 0; |
... | ... | |
755 | 756 |
|
756 | 757 |
// write the reserved bytes. |
757 | 758 |
// for (in j=0; jj<14; j++) out.writeByteLE(0); |
758 |
buffer.position(buffer.position() + 14);
|
|
759 |
((Buffer)buffer).position(((Buffer)buffer).position() + 14);
|
|
759 | 760 |
} |
760 | 761 |
} |
761 | 762 |
// write the end of the field definitions marker |
762 | 763 |
buffer.put((byte) 0x0D); |
763 | 764 |
|
764 |
buffer.position(0);
|
|
765 |
((Buffer)buffer).position(0);
|
|
765 | 766 |
|
766 | 767 |
int r = buffer.remaining(); |
767 | 768 |
|
Also available in: Unified diff