yilunzhang

InputStream   input = new InputStream();

int bufSize = 2048;

byte b[] = new byte[bufSize];    //创建一个数组,大小尽量根据文件设定

int count = 0; 

while((count = input.read(b, 0, bufSize)) != -1){         //按数组块读取文件流,当count为-1表示数组块读完

  fileOutputStream.write(b, 0, count); //本地上传文件

}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2021-07-01
  • 2021-10-10
  • 2022-02-13
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
相关资源
相似解决方案