org.deegree_impl.io.shpapi
Class DBFDataSection

java.lang.Object
  extended byorg.deegree_impl.io.shpapi.DBFDataSection

public class DBFDataSection
extends java.lang.Object

Class representing a record of the data section of a dBase III/IV file
at the moment only the daata types character ("C") and numeric ("N") are supported

Last changes:
28.04.00 ap: constructor declared and implemented
28.04.00 ap: method setRecord(ArrayList recData) declared and implemented
28.04.00 ap: method getDataSection() declared and implemented
03.05.00 ap: method setRecord(ArrayList recData) modified
03.05.00 ap: method setRecord(int index, ArrayList recData) declared and implemented
03.05.00 ap: method getDataSection() modified

Version:
03.05.2000
Author:
Andreas Poth

Field Summary
private  java.util.ArrayList data
           
private  FieldDescriptor[] fieldDesc
           
private  int recordlength
           
 
Constructor Summary
DBFDataSection(FieldDescriptor[] fieldDesc)
          constructor
 
Method Summary
 byte[] getDataSection()
          method: public byte[] getDataSection() returns the data section as a byte array.
 int getNoOfRecords()
          method: public int getNoOfRecords() returns the number of records within the container
 void setRecord(java.util.ArrayList recData)
          method: public setRecord(ArrayList recData) writes a data record to byte array representing the data section of the dBase file.
 void setRecord(int index, java.util.ArrayList recData)
          method: public setRecord(int index, ArrayList recData) writes a data record to byte array representing the data section of the dBase file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

recordlength

private int recordlength

fieldDesc

private FieldDescriptor[] fieldDesc

data

private java.util.ArrayList data
Constructor Detail

DBFDataSection

public DBFDataSection(FieldDescriptor[] fieldDesc)
constructor

Method Detail

setRecord

public void setRecord(java.util.ArrayList recData)
               throws DBaseException
method: public setRecord(ArrayList recData) writes a data record to byte array representing the data section of the dBase file. The method gets the data type of each field in recData from fieldDesc wich has been set at the constructor.

Throws:
DBaseException

setRecord

public void setRecord(int index,
                      java.util.ArrayList recData)
               throws DBaseException
method: public setRecord(int index, ArrayList recData) writes a data record to byte array representing the data section of the dBase file. The method gets the data type of each field in recData from fieldDesc wich has been set at the constructor. index specifies the location of the retrieved record in the datasection. if an invalid index is used an exception will be thrown

Throws:
DBaseException

getDataSection

public byte[] getDataSection()
method: public byte[] getDataSection() returns the data section as a byte array.


getNoOfRecords

public int getNoOfRecords()
method: public int getNoOfRecords() returns the number of records within the container