Here you can find the source of hasCompleted(ResultSet rs)
public static boolean hasCompleted(ResultSet rs)
//package com.java2s; //License from project: Open Source License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static boolean hasCompleted(ResultSet rs) { try {/* www .j a v a2s.c o m*/ return (rs.isClosed() || rs.isAfterLast()); } catch (SQLException e) { return false; } } }