I want to know if there is a way to check if a given string contains only combination of alphabets and numbers and nothing else.

for just alphanumeric i can use <http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html>

for just numbers i can use Interger.parse or some regular expression.

But is there some library which does the combined check. I googled but didnt came across anything. Everywhere it's done separately.