0
点赞
收藏
分享

微信扫一扫

Kyro - Output 类中没有 clear() 方法

SPEIKE 2022-05-18 阅读 97


问题信息

  • kyro4.0.2版本升级到5.0.0-RC7,Output 类中没有 clear() 方法

原因分析

  • 4.0升级到5.0版本后,Output类删除了clear()函数
// 4.0版本
public void clear() {
this.position = 0;
this.total = 0L;
}

// 5.0版本后改为使用reset()

// 5.0版本
public void reset() {
this.position = 0;
this.total = 0L;
}

解决方案

  • 原来使用clear(),改为使用reset()
output.reset();


举报

相关推荐

0 条评论