String2Txt

类别:Java 点击:0 评论:0 推荐:

import java.io.FileOutputStream;
import java.io.*;

public class String2File {
  public String2File() {
    String str = "abcdefghijklmnopqrstuvwxyz";
    try {
      FileOutputStream fos = new FileOutputStream("a.txt");
      byte[] b = str.getBytes();
      fos.write(b);
    }
    catch (Exception ex) {
    }
  }
}

本文地址:http://com.8s8s.com/it/it12621.htm