Hi,
we have various methods to write an integer with 1, 2, 3, or 4 bytes to an img
file.
I always feel unsure what method to use because none of them makes
clear what happens with negative values.
Besides that some of the existing routines seem to throw misleading exceptions,
e.g. FileBackedImgFileWriter seems to assume that it is only used for the mdr
tmp file and creates texts like this:
throw new MapFailedException("could not write3 to mdr tmp file");
throw new MapFailedException("could not write put3 to mdr tmp file");
Only the javadoc for put1() and put2() tell me the range (0..255 or 0..65535) .
If I got that right put3() allows negative values, so I think it is NOT
0..16777215 but -8388608 .. 8388607 ?
I'd like to improve the readability of the code, but I don't want to mess up
anything.
Would it be possible to add comments to all the methods?
Gerd
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev