Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
albfernandez committed Jul 28, 2017
1 parent 9f44839 commit 01467b4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main/java/com/linuxense/javadbf/DBFReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ public DBFReader(InputStream in, Boolean showDeletedRows) {
* @param in the InputStream where the data is read from.
* @param charset charset used to decode field names and field contents. If null, then is autedetected from dbf file
*/
public DBFReader(InputStream in,Charset charset) { this(in, charset, false); }
public DBFReader(InputStream in,Charset charset) {
this(in, charset, false);
}

/**
* Initializes a DBFReader object.
Expand All @@ -201,7 +203,7 @@ public DBFReader(InputStream in, Boolean showDeletedRows) {
* @param charset charset used to decode field names and field contents. If null, then is autedetected from dbf file
* @param showDeletedRows can be used to identify records that have been deleted.
*/
public DBFReader(InputStream in,Charset charset,Boolean showDeletedRows) {
public DBFReader(InputStream in, Charset charset, boolean showDeletedRows) {
try {

this.dataInputStream = new DataInputStream(in);
Expand Down Expand Up @@ -267,10 +269,12 @@ public DBFField getField(int index) {

// if showing deleted rows, ensure first column is the deleted flag field
if(showDeletedRows) {
if(index == 0)
if(index == 0) {
return new DBFField("DELETED", DBFDataType.LOGICAL);
else
}
else {
return new DBFField(this.header.fieldArray[index-1]);
}
}

return new DBFField(this.header.fieldArray[index]);
Expand Down Expand Up @@ -308,8 +312,9 @@ public Object[] nextRecord() {
isDeleted = t_byte == '*';
} while (isDeleted && !showDeletedRows);

if(showDeletedRows)
if(showDeletedRows) {
recordObjects.add(isDeleted);
}

for (int i = 0; i < this.header.fieldArray.length; i++) {
DBFField field = this.header.fieldArray[i];
Expand Down

0 comments on commit 01467b4

Please sign in to comment.