As you can read in the Javadocs, this class actually exists and your code should work.
Sadly I don't have the reputation to just comment on your question and tell you to improve it.