Maximum Texture Size

How can I get access the maximum texture size?

I don’t think there is a built in way. Could be useful though.

Looks like there is an API for OpenGL ES 2: