public class DbaseFileWriter
extends java.lang.Object
DbaseFileHeader header = ...
WritableFileChannel out = new FileOutputStream("thefile.dbf").getChannel();
DbaseFileWriter w = new DbaseFileWriter(header,out);
while ( moreRecords ) {
w.write( getMyRecord() );
}
w.close();
You must supply the moreRecords and
getMyRecord() logic...| Constructor and Description |
|---|
DbaseFileWriter(DbaseFileHeader header,
java.nio.channels.FileChannel out,
boolean isNew)
Create a DbaseFileWriter using the specified header and writing to the
given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(Feature feature)
Write a single dbase record.
|
void |
close()
Release resources associated with this writer.
|
protected FilteredLogger |
getLogger() |
void |
setCharset(java.nio.charset.Charset charset) |
void |
update(Feature feature,
long numReg)
Write a single dbase record.
|
public DbaseFileWriter(DbaseFileHeader header, java.nio.channels.FileChannel out, boolean isNew) throws InitializeException
header - The DbaseFileHeader to write.out - The Channel to write to.InitializeExceptionpublic void append(Feature feature) throws WriteException, UnsupportedEncodingException
public void update(Feature feature, long numReg) throws WriteException, UnsupportedEncodingException
public void close()
throws CloseException
CloseExceptionpublic void setCharset(java.nio.charset.Charset charset)
protected FilteredLogger getLogger()