The problem with this though is that any small change in the structure of the data file will cause methods like seek(4) to fail, and I'll still have to change my code anyway.
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs.
System.out.println(db.readByte()); // read in length of field name.
System.out.println(db.readUTF()); // read in the first field name.
I am Arthur, King of the Britons. And this is a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter