public void writeFromArrayList(String path, ArrayList<String> lines, String format, String style, boolean override) {
        try {
            FileOutputStream fos;
            BufferedWriter bw;
            if (override) {
                fos = new FileOutputStream(path);
                if (Check.NULLCheck(format))
                    bw = new BufferedWriter(new OutputStreamWriter(fos, format));
                else
                    bw = new BufferedWriter(new OutputStreamWriter(fos));
            } else {
                File fn = new File(path);
                if (!fn.exists()) {
                    fn.createNewFile();
                    fos = new FileOutputStream(fn);
                    if (Check.NULLCheck(format))
                        bw = new BufferedWriter(new OutputStreamWriter(fos, format));
                    else
                        bw = new BufferedWriter(new OutputStreamWriter(fos));
                } else{
                    Log.Print(path.substring(path.lastIndexOf(File.separator) + 1) + " 文件已存在");
                    return;
                }
            }

            for (int i = 0; i < lines.size(); ++i) {
                if (style.equalsIgnoreCase("unix"))
                    bw.write(lines.get(i) + "\n");
                else
                    bw.write(lines.get(i) + "\r\n");
            }
            bw.close();
            fos.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }