T
- 待写入数据的数据类型public class DbWriter<T> extends Object
构造器和说明 |
---|
DbWriter(Class<T> type,
File dbfile)
构造一个向avro文件中以新建方式写入指定类型数据的Writer
|
DbWriter(Class<T> type,
File dbfile,
boolean append)
构造一个向avro文件中写入指定类型数据的Writer
|
DbWriter(Class<T> type,
String dbpath)
构造一个向avro文件中以新建方式写入指定类型数据的Writer
|
DbWriter(Class<T> type,
String dbpath,
boolean append)
构造一个向avro文件中写入指定类型数据的Writer
|
public DbWriter(Class<T> type, File dbfile, boolean append) throws IOException
type
- 指定的数据类型dbfile
- avro文件append
- 是否追加IOException
public DbWriter(Class<T> type, String dbpath, boolean append) throws IOException
type
- 指定的数据类型dbpath
- avro文件路径append
- 是否追加IOException
public DbWriter(Class<T> type, String dbpath) throws IOException
type
- 指定的数据类型dbpath
- avro文件路径IOException
public DbWriter(Class<T> type, File dbfile) throws IOException
type
- 指定的数据类型dbfile
- avro文件IOException
public void flush() throws IOException
IOException
public void write(T data) throws IOException
data
- 要写入的数据IOException
public void close() throws IOException
IOException
Copyright © 2014. All Rights Reserved.