I cannot figure out a way to write data into a .dat file without overwriting already existing data. This is what I have so far:
public static void fileData(List<? extends Loggable> l, String pathName) throws IOException {
var file = new File(pathName);
var fileOut = new FileOutputStream(file);
var objOut = new ObjectOutputStream(fileOut);
objOut.close();
fileOut.close();
}