Java Dump File dumptoTempFile(List lineItems)

Here you can find the source of dumptoTempFile(List lineItems)

Description

dumpto Temp File

License

Apache License

Declaration

static File dumptoTempFile(List<String> lineItems) throws IOException,
            FileNotFoundException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.*;

import java.util.List;

public class Main {
    static File dumptoTempFile(List<String> lineItems) throws IOException,
            FileNotFoundException {
        // now rebuild the lines using the break rule...
        File createTempFile = File.createTempFile("brule", "log");
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(createTempFile)));
        for (String line : lineItems) {
            writer.write(line);/*www . j a va 2  s  .com*/
            writer.newLine();
        }
        writer.close();
        return createTempFile;
    }
}

Related

  1. dumpFile(String filename)
  2. dumpFile(String filename)
  3. dumpToFile(String dest, String content)
  4. dumpToFile(String fileName, String buffer, boolean append)
  5. dumpToFile(String name, String string)
  6. dumpToTemporaryFile(String modifiedSource, String modifiedPythonFile)