Delete all indices with specific pre-fix using JAVA APIs

No worries.

In case of doubt, just try to look at the REST class in elasticsearch code.
You'll see basically what is done behind the scene. Like here: