int to long

This commit is contained in:
Looly 2021-07-26 17:51:24 +08:00
parent fd6885441e
commit c9d6676e6d
2 changed files with 8 additions and 7 deletions

View File

@ -15,6 +15,7 @@
* 【http 】 HttpRequest.form方法判断集合增强pr#381@Gitee
* 【core 】 NumberUtil增加calculate方法
* 【core 】 优化TextSimilarity.longestCommonSubstring性能issue#I42A6V@Gitee
* 【core 】 MultipartRequestInputStream改为使用long以支持大文件issue#I428AN@Gitee
### 🐞Bug修复
* 【core 】 修复RobotUtil双击右键问题pr#1721@Github

View File

@ -41,7 +41,7 @@ public class MultipartRequestInputStream extends BufferedInputStream {
* @param i 跳过的byte数
* @throws IOException IO异常
*/
public void skipBytes(int i) throws IOException {
public void skipBytes(long i) throws IOException {
long len = super.skip(i);
if (len != i) {
throw new IOException("Unable to skip data in HTTP request");
@ -165,8 +165,8 @@ public class MultipartRequestInputStream extends BufferedInputStream {
* @return 复制的字节数
* @throws IOException 读取异常
*/
public int copy(OutputStream out) throws IOException {
int count = 0;
public long copy(OutputStream out) throws IOException {
long count = 0;
while (true) {
byte b = readByte();
if (isBoundary(b)) {
@ -186,8 +186,8 @@ public class MultipartRequestInputStream extends BufferedInputStream {
* @return 复制的字节数
* @throws IOException 读取异常
*/
public int copy(OutputStream out, long limit) throws IOException {
int count = 0;
public long copy(OutputStream out, long limit) throws IOException {
long count = 0;
while (true) {
byte b = readByte();
if (isBoundary(b)) {
@ -208,8 +208,8 @@ public class MultipartRequestInputStream extends BufferedInputStream {
* @return 跳过的字节数
* @throws IOException 读取异常
*/
public int skipToBoundary() throws IOException {
int count = 0;
public long skipToBoundary() throws IOException {
long count = 0;
while (true) {
byte b = readByte();
count++;