static void fileWriter(Request request) throws IOException { try(FileWriter writer = new FileWriter("information.txt")) { writer.write(request.toString()); //Need a new line in the file each time the method is called! } When outputting, I get everything in one line, how to switch to a new line during output to a file?
The output contains data about ip, host, port, I will be glad to any help!