Java string contains only specific characters