| 构造器 | 说明 |
|---|---|
AttributeTable() |
Constructor
|
AttributeTable(String filename) |
Constructor
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Object |
clone() |
Clone
|
void |
fill(int numRows) |
This populates the Table with data from the file.
|
String |
getEncoding() |
Get encoding string
|
File |
getFile() |
Get file
|
int |
getNumRecords() |
Get record number
|
DataTable |
getTable() |
Get data table
|
void |
open(String filename) |
Reads all the information from the file, including the vector shapes and
the database component.
|
void |
openDBF(String fileName) |
Reads all the information from the dBase file, including the vector
shapes and the database component.
|
void |
save() |
Save the file
|
void |
save(String fileName) |
Save the file
|
void |
saveAs(String fileName,
boolean overwrite) |
Save this table to the specified file name
|
void |
setEncoding(String value) |
Set encoding string
|
void |
setTable(DataTable table) |
Set data table
|
void |
updateDataTable() |
Update data table - convert DataColumn to Field
|
void |
writeHeader(EndianDataOutputStream writer) |
Write the header data to the DBF file
|
void |
writeTable() |
This appends the content of one datarow to a DBF file
|
public AttributeTable()
public AttributeTable(String filename) throws FileNotFoundException, IOException, Exception
filename - The file nameFileNotFoundExceptionIOExceptionExceptionpublic File getFile()
public int getNumRecords()
public DataTable getTable()
public void setTable(DataTable table)
table - The data tablepublic String getEncoding()
public void setEncoding(String value)
value - Encoding stringpublic void updateDataTable()
public void open(String filename) throws FileNotFoundException, IOException, Exception
filename - The file nameFileNotFoundExceptionIOExceptionExceptionpublic void openDBF(String fileName) throws FileNotFoundException, IOException, Exception
fileName - The dBase file nameFileNotFoundExceptionIOExceptionExceptionpublic void fill(int numRows)
throws FileNotFoundException,
IOException,
Exception
numRows - In the event that the dbf file is not found, this
indicates how many blank rows should exist in the attribute Table.FileNotFoundExceptionIOExceptionExceptionpublic void save()
public void save(String fileName)
fileName - File namepublic void saveAs(String fileName, boolean overwrite)
fileName - The file name to be savedoverwrite - If over write the file if it existspublic void writeHeader(EndianDataOutputStream writer) throws IOException
writer - The writer streamIOException - IO exceptionpublic void writeTable()
throws IOException
IOExceptionCopyright © 2019. All rights reserved.