Warships on the high seas have complete immunity from the jurisdiction of any State other than the flag State.

UNCLOS : http://www.un.org/depts/los/convention_agreements/texts/unclos/unclos_e.pdf