I have been reading this forum for a while now and have gotten a lot of my questions in regards to the SCJD cert answered by browsing through the different posts.
I am currently working on the DB Access part of the cert. Actually, it's going pretty good, but there is one little thing I cannot figure out.
Before reading a record into a byte array and making a String out of it, I use the readByte() method to read in the status/delete flag for every record. I then convert the byte to an int and save it into an ArrayList. For some reason, when printing my status flag/delete flag variable it displays as "32" and not "0." I would really like to figure out how to get it into the right format and have it display as 0. Anyways, any advice is appreciated.
Thank you for the welcome, and, yes, I did utilize the tool and it worked great . However, when replacing the inputstream by a RandomAccessFile, the status flag/delete flag value does not display as 0 anymore, but as 32. As I said in my initial post, I maneuver directly to the status flag location e.g.,
I tried this in multiple ways, with the same end result: The value stored ends up being 32. Maybe I am getting worked up over nothing here but I would really like to know why the read-in value does not display correctly when using a RAF .
Champion, you really shouldn't be having problems to read your file with the DBFileReader tool, no matter if you are using FileInputStream or RandomAccessFile. Do you get any IOException or the status flag is just displayed wrongly?