I need to store and read ArrayList Objects to a file, which that itself isn't the issue. I need to store it with a specific format and have it have a "header" of sorts while still having each ArrayList Object be usable from the file. Another part to it, is it needs to be readable by opening the text file itself, so no serialization can be used (Unless I'm just severely mistaken on how to use serialization). Example of how the working file should look below (Figure 1).

I will include all my code below just so nothing important isn't show on accident.
Airline.java
public class Airline extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Airline.fxml"));
Scene scene = new Scene(root);
stage.setTitle("Seat Reservation");
stage.setResizable(false);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Passenger p1 = new Passenger(0001, "John Smith", "1A", "AA12");
Passenger p2 = new Passenger(0002, "Annah Smith", "1B", "AA12");
//creating arraylist
ArrayList <Passenger> pList = new ArrayList <Passenger>();
pList.add(p1);
pList.add(p2);
try {
FileOutputStream fos = new FileOutputStream(new
File("reservations.txt"));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(pList);
oos.close();
fos.close();
FileInputStream fis = new FileInputStream(new
File("reservations.txt"));
ObjectInputStream ois = new ObjectInputStream(fis);
ArrayList list = (ArrayList) ois.readObject();
System.out.println(list.toString());
ois.close();
fis.close();
} catch (FileNotFoundException e) {
System.out.println("File not found");
} catch (IOException e) {
System.out.println("Error initializing stream");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
launch(args);
}
}
Passenger.java
public class Passenger implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private String name;
private String seat;
private String flight;
Passenger() {
};
public Passenger (int idP, String nameP,String seatP, String flightP) {
this.id = idP;
this.name = nameP;
this.seat = seatP;
this.flight = flightP;
}
@Override
public String toString() {
return "\n" + id + " " + name + " " + seat + " " + flight;
}
}
The code I have currently shows this when opening the text file (Figure 2 below).

If anyone has any suggestions please let me know! I've been stumped for quite a while now.
Also, if this breaks any rules or doesn't have the proper tags, let me know and I'll remove/edit it.