theworld
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileR_W {
    public static void main(String[] args) throws IOException {
        //创建输入流输出流
        FileInputStream fis = new FileInputStream("70.jpg");
        FileOutputStream fos = new FileOutputStream("test_jpg.jpg",true);
        int len;
        byte[] b = new byte[1024];
        while ((len=fis.read(b))!=-1){
           fos.write(b,0,len);

        }
        fos.close();
        fis.close();
    }
}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-02-11
  • 2021-08-24
  • 2021-05-18
  • 2021-07-17
  • 2021-11-02
  • 2022-02-02
猜你喜欢
  • 2021-08-14
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-01-04
  • 2021-06-12
相关资源
相似解决方案