就把下面的Str下到文件中,该怎么改呢?谢谢了
String str="i love china!"
File txt=new File("C:\Documents and Settings\Administrator\桌面\nihao.txt");
if(!txt.exists()){
txt.createNewFile();
}
byte bytes[]=new byte[512];
int b=Integer.parseInt(str);
FileOutputStream fos=new FileOutputStream(txt);
fos.write(bytes,0,b);
fos.close();