Don't have Telegram yet? Try it now!
https://kodejava.org/how-do-i-get-the-extension-of-a-file/
How do I get the extension of a file?