ru.smartflex.tools.dbf
Class DbfHeader

java.lang.Object
  extended by ru.smartflex.tools.dbf.DbfHeader

public class DbfHeader
extends java.lang.Object

Contains dbf header definition.

Since:
1.00
Author:
galisha

Constructor Summary
protected DbfHeader()
           
protected DbfHeader(java.io.File dbfFile, java.lang.String enc, DbfIterator dbfIterator)
           
protected DbfHeader(java.io.InputStream is, java.lang.String enc, DbfIterator dbfIterator)
           
 
Method Summary
 void closeDbfHeader()
          Closes dbf stream (and also iterator).
 java.util.Iterator<DbfColumn> getColumnIterator()
          Returns dbf column iterator.
 int getCountColumns()
          Returns count of column.
 int getCountRecords()
          Returns all amount of records with deleted rows.
 DbfIterator getDbfIterator()
          Returns iterator.
 boolean isColumnExisted(java.lang.String... columnNames)
          Checks entirely array of column names in dbf header.
 boolean isColumnExisted(java.lang.String columnName)
          Checks column name in dbf header.
 boolean isDbfHeaderValid()
          Validates dbf header
 java.lang.String toString()
          To String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbfHeader

protected DbfHeader(java.io.File dbfFile,
                    java.lang.String enc,
                    DbfIterator dbfIterator)

DbfHeader

protected DbfHeader(java.io.InputStream is,
                    java.lang.String enc,
                    DbfIterator dbfIterator)

DbfHeader

protected DbfHeader()
Method Detail

getDbfIterator

public DbfIterator getDbfIterator()
Returns iterator.

Returns:
iterator.
Since:
1.05

closeDbfHeader

public void closeDbfHeader()
Closes dbf stream (and also iterator).

Since:
1.05
See Also:
DbfIterator

isColumnExisted

public boolean isColumnExisted(java.lang.String columnName)
Checks column name in dbf header.

Parameters:
columnName - column name
Returns:
true if column is existed
Since:
1.05

isColumnExisted

public boolean isColumnExisted(java.lang.String... columnNames)
Checks entirely array of column names in dbf header.

Parameters:
columnNames - array of column names
Returns:
boolean flag
Since:
1.06

getColumnIterator

public java.util.Iterator<DbfColumn> getColumnIterator()
Returns dbf column iterator.

Returns:
dbf column iterator
Since:
1.05

getCountRecords

public int getCountRecords()
Returns all amount of records with deleted rows.

Returns:
amount of records
Since:
1.05

getCountColumns

public int getCountColumns()
Returns count of column.

Returns:
column count
Since:
1.05

toString

public java.lang.String toString()
To String.

Overrides:
toString in class java.lang.Object
Since:
1.05

isDbfHeaderValid

public boolean isDbfHeaderValid()
Validates dbf header

Returns:
true if header is ok
Since:
1.06