Hi there... I have 2 questions about the database file format:
it says :
All text values, and all fields (which are text only) conatins only 8 bit characters, null terminated if less than the maximum length for the field.
1. Does the null terminated thing applies to both the text values in the schema "Filed Names", and the actual record text values. The statement above,"All text values, and all fields (which are text only)" , is confusing, I don't know what do they exactly refer to. 2. after Fully Reading the text value, do we have to truncated when there is a null character in it? Because I was able to read the file but then, although the first field is less than the length specified in the schema, it wasn't terminated with null, instead padded with spaces. I am confused now between fully reading the record or reading one byte at a time until the null character is read or the length of the field is reached.
I think your assumptions look reasonable - just make sure you document them in your design decisions document.
As a side note: it is my understanding that Sun do not have a test harness (yes, I do know that this contradicts what they say in their instructions). They do have automated tests that will confirm basic structure of your submission / method signatures of specified interfaces and classes, but that is as far as it goes. There has been some speculation that a test harness was too difficult to generate since Sun have not specified a constructor for the Data class (and there are many different constructors possible).
Sorry about the misprint. (By the way we have fixed the problem.) Yes, please treat the file as space-padded, not null-terminated.
It's very clear, I will also add this message to my cohices.txt file. I am posting this and I would like to ensure the credibility and authenticity of this message.
I agree with you regarding the test harness thing. As if you were able to read my mind. My Data.java class has a private constuctor and a getInstance() method, and I was thinking in case this class is automatically tested then how would they create an instance of it dynamicly. But your words moved a huge load off my back. Thanx Andrew and of course everybody in this forum for your constant support.