@Override
	public int write(ResultSet rs) throws IOException,SQLException {
		ResultSetMetaData md = rs.getMetaData();
		int colCount = md.getColumnCount();
		for (int i = 1; i <= colCount; i++) {
			print(md.getColumnName(i) + "\t");
		}
		println();
		int rowCount = 0;
		while (rs.next()) {
			++rowCount;
			for (int i = 1; i <= colCount; i++) {
				print(rs.getString(i) + "\t");
			}
			println();
		}
		return rowCount;
	}