Skip to content

Commit

Permalink
Update read file size
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksgata committed May 18, 2022
1 parent 7f3a4f2 commit 43b6cb5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/indi/eiriksgata/dice/reply/CustomText.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static byte[] fileRead(File file) throws IOException {
FileInputStream fileInputStream = new FileInputStream(file);
int readLength;
int countLength = 0;
byte[] bufferContent = new byte[1048576];
byte[] bufferContent = new byte[10485760];
while (true) {
readLength = fileInputStream.read(bufferContent, countLength, 1024);
if (readLength == -1) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/custom-text.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@
"dice.sa.parameter.error": "你输入的指令参数中没有需要更改的数值",
"dice.sa.not.set.attribute": "你尚未设置属性,可以通过指令.st来进行设置",
"dice.sa.not.found.attribute": "你的属性中,不存在该属性,请通过.st重新设置",
"dice.sa.update.success": "您的属性已更新:{0}=>{1}{2}"
"dice.sa.update.success": "您的属性已更新:{0}=>{1}{2}",
"query.doc.lib.result.list.not.found" : "自定义文档没找到相关内容.",
"query.doc.lib.result.list.tail": "\n最多显示30条数据。如果需要查询更多信息,请输入更精准的关键字",
"query.doc.lib.result.list.title": "查询结果存在多个,请在3分钟以内回复清单的数字来查阅内容:"
}
5 changes: 4 additions & 1 deletion src/main/resources/default-text.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@
"dice.sa.parameter.error": "你输入的指令参数中没有需要更改的数值",
"dice.sa.not.set.attribute": "你尚未设置属性,可以通过指令.st来进行设置",
"dice.sa.not.found.attribute": "你的属性中,不存在该属性,请通过.st重新设置",
"dice.sa.update.success": "您的属性已更新:{0}=>{1}{2}"
"dice.sa.update.success": "您的属性已更新:{0}=>{1}{2}",
"query.doc.lib.result.list.not.found" : "自定义文档没找到相关内容.",
"query.doc.lib.result.list.tail": "\n最多显示30条数据。如果需要查询更多信息,请输入更精准的关键字",
"query.doc.lib.result.list.title": "查询结果存在多个,请在3分钟以内回复清单的数字来查阅内容:"
}
1 change: 1 addition & 0 deletions src/test/java/DiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ void randomUtilsNextInt() {
System.out.println(RandomUtils.nextInt(0, 2));
}
}


}

0 comments on commit 43b6cb5

Please sign in to comment.