Retrieving external IDP tokens using Java SDK

I have been able to successfully retrieve external IDP tokens using the API call GET /realms/{realm}/broker/{provider_alias}/token HTTP/1.1 with the Authorization: Bearer <KEYCLOAK ACCESS TOKEN> header. Now, I would like to know if it is possible to achieve the same functionality through the Java SDK. Can you provide any guidance or examples for this?

Here is the link to the relevant API documentation