Reversing the lines of file
You have a number of open resoruces that you do not close properly, FileOutputStreams, BufferedWriters, etc. These should be handled with a try-with-resources block.

Additionally, the standard Java libraries contain helper methods that will make this operation almost trivial... See Files.readAllLines()

Together, this could all be done as:

private static void reverseLines(String fileName) {
    Path path = Paths.get(fileName);
    try {
        List&lt;String&gt; lines = Files.readAllLines(path);
        try (BufferedWriter writer = Files.newBufferedWriter(path)) {
            ListIterator&lt;String&gt; lineIterator = lines.listIterator(lines.size());
            while (lineIterator.hasPrevious()) {
                writer.write(lineIterator.previous());
                writer.newLine();
            }
        }
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }

}