Skip to content

Commit

Permalink
Support for data address offset from beginning of record.
Browse files Browse the repository at this point in the history
  • Loading branch information
e.gizatullin committed Sep 29, 2015
1 parent 5996f23 commit ff9f66e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/net/iryndin/jdbf/util/DbfMetadataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public static void writeDbfField(DbfField field, byte[] fieldBytes) {
}
System.arraycopy(nameBytes, 0, fieldBytes, 0, nameBytes.length);
fieldBytes[11] = field.getType().toByte();
byte[] b = BitUtils.makeByte4(field.getOffset());
fieldBytes[12] = b[0];
fieldBytes[13] = b[1];
fieldBytes[14] = b[2];
fieldBytes[15] = b[3];
int length = field.getLength();
fieldBytes[16] = (byte) (length & 0xff);
fieldBytes[17] = (byte) (field.getNumberOfDecimalPlaces() & 0xff);
Expand Down

0 comments on commit ff9f66e

Please sign in to comment.