import java.io.*;
class FileTest
{
public static void main(String argvs[]) throws IOException
{
FileInputStream fis = new FileInputStream("FileTest.java");
FileOutputStream fos = new FileOutputStream("new.txt");
byte[] buf = new byte[32];
int read = 0;
while ( (read = fis.read(buf)) > 0 )
{
fos.write(buf ,0 ,read);
}
fis.close();
fos.close();
}
}
了解FileOutputStream
最新推荐文章于 2023-05-11 08:42:59 发布