Hi, I've the following question : 1. I'm wondering whether the criteriaFind() method needs to be synchronized, since this is also called by various clients simultaneously ! 2. While changing the methods in Data Class to remove deprecated methods, I need some clarification on using System default for Character encoding and UTF8 or UTF16. Thanks in advance. - Ravi.
ok - i do notice smthg from the deprecated method which led to the decision to use UTF8 instead of 16. The deprecated method has an input argument 0 for "hiint" (check the api). I interpreted it as discarding the high-byte of the unicode. So only 8-bit is used, i.e. UTF8 - hope this help!
Correct me if I'm wrong, but it shouldn't matter. Only the least significant byte is used anyway to write to the file. So UTF-16 should not be used by the caller, else the data will end up screwed up - which I pointed out in one of the threads as a deficiency of the provided code. The "intern" who wrote it advertized public methods as accepting Strings, although behind the scenes he uses bytes. So, I'd say, pointing this out in the docs shouldn't hurt (I am going to do that), and then it doesn't really matter... Unless you want to rewrite DataInfo and FieldInfo to only accept UTF-8 values (which the "intern" should have done), and not use Strings in Data at all - just use DataInfo and FieldInfo. Which is what he or she should have done as well.
I'm so happy! And I wish to make this tiny ad happy too:
Devious Experiments for a Truly Passive Greenhouse!