Skip to content

Commit ccfb384

Browse files
committed
1.63
1 parent b84c8e6 commit ccfb384

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package dev.felnull.fnjl;
22

33
public class FNJLBuildIn {
4-
protected static final String VERSION = "1.62";
4+
protected static final String VERSION = "1.63";
55
}

common/src/main/java/dev/felnull/fnjl/util/FNDataUtil.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -534,16 +534,16 @@ public static void bufInputToOutput(InputStream inputStream, OutputStream output
534534
* @return 制限サイズを超えた場合は-1、それ以外はサイズ
535535
* @throws IOException 例外
536536
*/
537-
@Range(from = -1, to = Integer.MAX_VALUE)
538-
public static int inputToOutputLimit(@NotNull InputStream inputStream, @NotNull OutputStream outputStream, @Range(from = 0, to = Integer.MAX_VALUE) int readSize, @Range(from = 0, to = Integer.MAX_VALUE) int limit) throws IOException {
539-
int ct = 0;
537+
@Range(from = -1, to = Long.MAX_VALUE)
538+
public static long inputToOutputLimit(@NotNull InputStream inputStream, @NotNull OutputStream outputStream, @Range(from = 0, to = Integer.MAX_VALUE) int readSize, @Range(from = 0, to = Long.MAX_VALUE) long limit) throws IOException {
539+
long ct = 0;
540540
boolean flg = false;
541541
try (InputStream in = inputStream; OutputStream out = outputStream) {
542542
byte[] data = new byte[readSize];
543543
int len;
544544
while (!flg && (len = in.read(data)) != -1) {
545545
if ((ct + len) > limit) {
546-
len = limit - ct;
546+
len = (int) (limit - ct);
547547
flg = true;
548548
}
549549
ct += len;
@@ -564,8 +564,8 @@ public static int inputToOutputLimit(@NotNull InputStream inputStream, @NotNull
564564
* @return 制限サイズを超えた場合は-1、それ以外はサイズ
565565
* @throws IOException 例外
566566
*/
567-
@Range(from = -1, to = Integer.MAX_VALUE)
568-
public static int inputToOutputLimit(@NotNull InputStream inputStream, @NotNull OutputStream outputStream, @Range(from = 0, to = Integer.MAX_VALUE) int limit) throws IOException {
567+
@Range(from = -1, to = Long.MAX_VALUE)
568+
public static long inputToOutputLimit(@NotNull InputStream inputStream, @NotNull OutputStream outputStream, @Range(from = 0, to = Long.MAX_VALUE) long limit) throws IOException {
569569
return inputToOutputLimit(inputStream, outputStream, 1024, limit);
570570
}
571571

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fnjl_group=dev.felnull
22
fnjl_name=felnull-java-library
3-
fnjl_version=1.62
3+
fnjl_version=1.63
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dev.felnull.fnjln;
22

33
public class FNJLNBuildIn {
4-
protected static final String VERSION = "1.62";
4+
protected static final String VERSION = "1.63";
55

66
protected static final int NATIVE_LIBRARY_VERSION = 1;
77
}

0 commit comments

Comments
 (0)