get name by ext method added
making code compatible with java 1.6