public class DBFWriter extends FormatWriter<DBFHeader>
appendFile
Constructor and Description |
---|
DBFWriter()
Deprecated.
|
DBFWriter(java.io.File dbfFile)
Deprecated.
The append option is automatically determined in this writer depending on whether the file exists. This
feature is unsafe. The constructor with the append parameter is preferable to this one.
|
DBFWriter(java.io.File dbfFile,
boolean append)
Creates a DBFWriter which can append to records to an existing DBF file.
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(java.lang.Object[] values)
Add a record.
|
void |
close() |
FormatField |
convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
This method generates the appropriate FormatField given a GExportFieldDetails instance.
|
java.lang.String |
getCharactersetName() |
void |
setCharactersetName(java.lang.String characterSetName) |
void |
setFields(DBFField[] fields)
Deprecated.
Use the setFields(Vector
|
void |
setFields(java.util.List<FormatField> fields)
This method sets the fields in the header.
|
void |
write() |
void |
write(java.io.OutputStream out)
Writes the set data to the OutputStream.
|
createFormatWriter, getFilename, getHeader, setFields, setFormatHeader, validateRecord
@Deprecated public DBFWriter()
@Deprecated public DBFWriter(java.io.File dbfFile) throws java.io.IOException
dbfFile
- The file passed in should be a valid DBF file.Throws
- DBFException if the passed in file does exist but not a valid DBF file, or if an IO error occurs.java.io.IOException
public DBFWriter(java.io.File dbfFile, boolean append) throws java.io.IOException
dbfFile
- The file passed in should be a valid DBF file.append
- true if the file is to be appendedThrows
- IOException if the passed in file does exist but not a valid DBF file, or if an IO error occurs.java.io.IOException
public java.lang.String getCharactersetName()
public void setCharactersetName(java.lang.String characterSetName)
@Deprecated public void setFields(DBFField[] fields) throws java.io.IOException
java.io.IOException
public void setFields(java.util.List<FormatField> fields) throws java.io.IOException
FormatWriter
setFields
in class FormatWriter<DBFHeader>
fields
- a Vector of FormatField instancesjava.io.IOException
public void addRecord(java.lang.Object[] values) throws DBFException
addRecord
in class FormatWriter<DBFHeader>
values
- an Array of object to be written in the output fileDBFException
public void write(java.io.OutputStream out) throws DBFException
DBFException
public void write() throws DBFException
DBFException
public void close()
public FormatField convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
FormatWriter
convertGExportFieldDetailsToFormatField
in class FormatWriter<DBFHeader>
details
- a GExportFieldDetails object