What does the method hasResultData do?
You haven't posted that one (unless I'm being blind, which is not unheard of).
Edit: Also, why are you checking whether there is data?
You already know that as you have extracted it.
If there was no data then the code would have thrown an exception the first time you tried to do rs.getString().