There is no more elegant way of selectively "catching" nested exceptions. I suppose if you did this kind of nested exception catching a lot, you could possibly refactor the code into a common utility method. But it still won't be either elegant or efficient.
The elegant solution is to do away with the exception nesting. Either don't chain the exceptions in the first place, or (selectively) unwrap and rethrow the nested exceptions further up the stack.
Exceptions tend to be nested for 3 reasons:
You have decided that the details of the original exception are unlikely to be useful for the application's error recovery ... but you want to preserve them for diagnostic purposes.
You are implementing API methods that doesn't allow checked exceptions but your code (unavoidably) throws such exceptions. (A common workaround is to "smuggle" the exception inside an unchecked exception.)
You are being lazy and turning a diverse set of exceptions into a single exception to avoid having lots of checked exceptions in your method signature.
In the first case, if you need to discriminate on the wrapped exceptions your initial assumptions / design is incorrect, and the ideal solution is change method signatures so that you can get rid of the nesting.
In the second case, you probably should unwrap the exceptions as soon as control has passed the problematic API method.
In the third case, you should rethink your exception handling strategy; i.e. do it properly.