IS IT OK? SHOULD IT WORK?
Yes. Possibly you would like to add commas between the numbers to make it into valid Java ;-).
and, for the other IR code, this one:
9000 4500 560 565 560 1690 560 565 560 565 560 1690 560 1690 560 1690 560 565 560 1690 560 565 560 1690 560 1690 560 1690 560 565 560 1690 560 1690 560 565 560 1690 560 1690 560 1690 560 565 560 565 560 565 560 565 560 1690 560 565 560 565 560 565 560 1690 560 1690 560 1690 560 1690 560
Not sure what you mean here. The signal is already a number of durations in micro seconds, and there is no information on modulation frequency.
If the modulation frequency is off by, say, 2kHz, it is in general not a big deal, unless you try to maximize the range.