A simple measurement technique for critical current density by using a permanent magnet