Skip to content

Commit

Permalink
New Constructor with boolean param
Browse files Browse the repository at this point in the history
  • Loading branch information
albfernandez committed Jan 19, 2024
1 parent fad00e3 commit 5e87fdb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/main/java/com/linuxense/javadbf/DBFReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.BitSet;
Expand Down Expand Up @@ -183,8 +181,22 @@ public DBFReader(InputStream in) {
* @param in the InputStream where the data is read from.
* @param showDeletedRows can be used to identify records that have been deleted.
*/
// TODO Change to boolean in 2.0
public DBFReader(InputStream in, Boolean showDeletedRows) {
this(in,null, showDeletedRows == null ? false : showDeletedRows.booleanValue());
}

/**
* Intializes a DBFReader object.
*
* Tries to detect charset from file, if failed uses default charset ISO-8859-1
* When this constructor returns the object will have completed reading the
* header (meta date) and header information can be queried there on. And it
* will be ready to return the first row.
*
* @param in the InputStream where the data is read from.
* @param showDeletedRows can be used to identify records that have been deleted.
*/
public DBFReader(InputStream in, boolean showDeletedRows) {
this(in,null, showDeletedRows);
}

Expand Down Expand Up @@ -227,7 +239,7 @@ public DBFReader(InputStream in, Charset charset, 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
* @param showDeletedRows can be used to identify records that have been deleted.
* @param supportExtendedCharacterFields Defines whether 2-byte (extended) length character fields should be supported (see DBFField.adjustLengthForLongCharSupport(), default: true).
* @param supportExtendedCharacterFields Defines whether 2-byte (extended) length character fields should be supported (see DBFField.adjustLengthForLongCharSupport(), default: true).
*/
public DBFReader(InputStream in, Charset charset, boolean showDeletedRows, boolean supportExtendedCharacterFields) {
try {
Expand Down

0 comments on commit 5e87fdb

Please sign in to comment.