If the field contains space character at the begining, the "field.getLength()" counts the length contains length of non-space, then the "dataInputStream.read" only cut the first length, so return the spaces but cut off characters at the end.
below is where it happened:
protected Object getFieldValue(DBFField field) throws IOException {
int bytesReaded = 0;
switch (field.getType()) {
case CHARACTER:
byte b_array[] = new byte[field.getLength()];
bytesReaded = this.dataInputStream.read(b_array);
If the field contains space character at the begining, the "field.getLength()" counts the length contains length of non-space, then the "dataInputStream.read" only cut the first length, so return the spaces but cut off characters at the end.
below is where it happened: protected Object getFieldValue(DBFField field) throws IOException { int bytesReaded = 0; switch (field.getType()) { case CHARACTER: byte b_array[] = new byte[field.getLength()]; bytesReaded = this.dataInputStream.read(b_array);