JAVA中文件与Byte数组相互转换的方法,如下: public class FileUtil { //将文件转换成Byte数组 public static byte[] getBytesByFile(String pathStr) { File file = new File(pathStr); try { FileInputStream fis = new FileInputStream(file); ByteArrayOutputStream bos = new ByteArrayOutp
1.方法1 public static void main(String[] args) { try { FileWriter fileWriter = new FileWriter("c:\\Result.txt"); String ss = "cName\t\cCode\t\tcreateDate\n"; ss += "dbc券\t\t111188\t\t2017-05-14\n"; ss += "zc券\t\t111199\t\t