冲洗输出流
/** from * n o w j a v a . c o m **/ import java.io.DataOutputStream; import java.io.FileOutputStream; import java.io.IOException; public class Main { public static void main(String[] args) { String strFilePath = "C://Folder//WriteByte.txt"; try{ FileOutputStream fos = new FileOutputStream(strFilePath);/** 时 代 J a v a - nowjava.com 提 供 **/ DataOutputStream dos = new DataOutputStream(fos); String strContent = "This example shows how to flush output stream!"; dos.writeBytes(strContent); dos.flush();