The file can optionally include in its first row the encoding scheme to use. For exmaple, the line "8859_1,," specifies 8859_1 encoding is to be used. For such cases, this class should be instantiated with the encoding parameter being null.
Most files also contain in its first line (if no encoding is specified) or 2nd line (if encoding is specified) header information (such as the names of the columns). This header will not be read. However, some files does not contain the header. For these files, the class should be instantiated with the hasHeader parameter being false, otherwise, the first key-value pair will be skipped.
Comments are indicated by a leading '#' character. Note that the keys (that is the first column of each row) must not begin with '#'. Currently even wrapping quotes around '#' will be treated as comments. Any comments if any, must appear after the encoding line (if any) and the header (if any).
Note that this class is not synchronized. It is expected that the mapping be first generated when the mapping file is read. Only after that should the key-value pairs (or the entire map) be accessed.
@aribaapi documented
|
|