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.IOExceptionpublic 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.IOExceptionpublic java.lang.String getCharactersetName()
public void setCharactersetName(java.lang.String characterSetName)
@Deprecated public void setFields(DBFField[] fields) throws java.io.IOException
java.io.IOExceptionpublic void setFields(java.util.List<FormatField> fields) throws java.io.IOException
FormatWritersetFields in class FormatWriter<DBFHeader>fields - a Vector of FormatField instancesjava.io.IOExceptionpublic void addRecord(java.lang.Object[] values)
throws DBFException
addRecord in class FormatWriter<DBFHeader>values - an Array of object to be written in the output fileDBFExceptionpublic void write(java.io.OutputStream out)
throws DBFException
DBFExceptionpublic void write()
throws DBFException
DBFExceptionpublic void close()
public FormatField convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
FormatWriterconvertGExportFieldDetailsToFormatField in class FormatWriter<DBFHeader>details - a GExportFieldDetails object