Hi Olena
I didn’t throw any exceptions during the call of the getHeaderNames, any IOException, because the names will be read only ones during the Initialisation. How do you think is this a good design? Or should I read the fields’ names every time when I call the DataShema.getFieldsName() method?
My questions to you (which I suspect you already know the answer to) are: when can the field names change? and/or do you have any methods which will allow the field names to be changed.
If the field names cannot be changed, then it seems to be more efficient to cache them (as you are doing) rather than re-reading them each time someone calls the getFieldsName() method.
Just my opinion of course.
Regards, Andrew