public synchronized int next() throws SQLException
public synchronized int next()
    public synchronized int next() throws SQLException    {        Connection conn = null;        PreparedStatement prepStmt = null;        ResultSet rs = null;        try        {            // create the connection and execute the statement            conn = DatabaseManager.getConnection();            // should process loop infinitely through the            // bitstreams in most_recent_checksum table?            if (!loopContinuously && (processStartTime != null))            {                prepStmt = conn.prepareStatement(FIND_BITSTREAMS_NO_LOOP);                prepStmt.setTimestamp(1, new java.sql.Timestamp(                        processStartTime.getTime()));            }            else            {                prepStmt = conn.prepareStatement(FIND_BITSTREAMS_LOOP);            }            rs = prepStmt.executeQuery();            if (rs.next())            {                return rs.getInt(1);            }            else            {                return SENTINEL;            }        }        finally        {            if (rs != null)            {                rs.close();            }            if (prepStmt != null)            {                prepStmt.close();            }            if (conn != null)            {                DatabaseManager.freeConnection(conn);            }        }    }