package com.yc.ship.module.trade.controller.app.order;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

public  class FileDeal {
	public  static String fileRead(File fl) {
		StringBuilder result = new StringBuilder();
		BufferedReader br;
		if (!fl.exists()) {
			System.err.println("文件不存在！");
		}
		try {
			br = new BufferedReader(new FileReader(fl.getAbsolutePath()));
			String s = null;
			while ((s = br.readLine()) != null) {
				result.append(s);
			}
			br.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result.toString();
	}
}
