字节写

xiaoxiao2021-02-28  111

String strTxt="文件内容";

FileOutputStream fount=new FileOutputStream(“xyz”);

byte[]b  = new byte[1024];

b = StrTxt.getBytes();

int len =b.length;

int i = 0;

while (i<len){

fount.write(b[i]);

i++;

}

fount.close();

转载请注明原文地址: https://www.6miu.com/read-47982.html

最新回复(0)