/** * Creates a test file with a specified number of lines. * * @param file target file * @param lineCount number of lines to create * * @throws IOException If an I/O error occurs */ private List<String> createLinesFile(final File file, final int lineCount) throws IOException { final List<String> lines = createStringLines(lineCount); FileUtils.writeLines(file, lines); return lines; }
/** * Creates a test file with a specified number of lines. * * @param file target file * @param encoding the encoding to use while writing the lines * @param lineCount number of lines to create * * @throws IOException If an I/O error occurs */ private List<String> createLinesFile(final File file, final String encoding, final int lineCount) throws IOException { final List<String> lines = createStringLines(lineCount); FileUtils.writeLines(file, encoding, lines); return lines; }