mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
change method param
This commit is contained in:
parent
5717fb52c5
commit
612441615d
@ -8,6 +8,7 @@
|
|||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【core 】 CsvReadConfig增加trimField选项(issue#I49M0C@Gitee)
|
* 【core 】 CsvReadConfig增加trimField选项(issue#I49M0C@Gitee)
|
||||||
* 【http 】 HttpBase增加clearHeaders方法(issue#I49P23@Gitee)
|
* 【http 】 HttpBase增加clearHeaders方法(issue#I49P23@Gitee)
|
||||||
|
* 【core 】 CsvWriter的write和writeBeans参数改为Iterable(issue#I49O4S@Gitee)
|
||||||
*
|
*
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复FuncKey函数无效问题
|
* 【core 】 修复FuncKey函数无效问题
|
||||||
|
@ -20,7 +20,6 @@ import java.io.IOException;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -199,7 +198,7 @@ public final class CsvWriter implements Closeable, Flushable, Serializable {
|
|||||||
* @return this
|
* @return this
|
||||||
* @throws IORuntimeException IO异常
|
* @throws IORuntimeException IO异常
|
||||||
*/
|
*/
|
||||||
public CsvWriter write(Collection<?> lines) throws IORuntimeException {
|
public CsvWriter write(Iterable<?> lines) throws IORuntimeException {
|
||||||
if (CollUtil.isNotEmpty(lines)) {
|
if (CollUtil.isNotEmpty(lines)) {
|
||||||
for (Object values : lines) {
|
for (Object values : lines) {
|
||||||
appendLine(Convert.toStrArray(values));
|
appendLine(Convert.toStrArray(values));
|
||||||
@ -236,7 +235,7 @@ public final class CsvWriter implements Closeable, Flushable, Serializable {
|
|||||||
* @param beans Bean集合
|
* @param beans Bean集合
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public CsvWriter writeBeans(Collection<?> beans) {
|
public CsvWriter writeBeans(Iterable<?> beans) {
|
||||||
if (CollUtil.isNotEmpty(beans)) {
|
if (CollUtil.isNotEmpty(beans)) {
|
||||||
boolean isFirst = true;
|
boolean isFirst = true;
|
||||||
Map<String, Object> map;
|
Map<String, Object> map;
|
||||||
|
@ -761,4 +761,13 @@ public class ExcelWriteTest {
|
|||||||
writer.writeRow(row);
|
writer.writeRow(row);
|
||||||
writer.close();
|
writer.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void writeLongTest(){
|
||||||
|
//https://gitee.com/dromara/hutool/issues/I49R6U
|
||||||
|
final ExcelWriter writer = ExcelUtil.getWriter("d:/test/long.xlsx");
|
||||||
|
writer.write(ListUtil.of(1427545395336093698L));
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user