PythagoreanTriplet in integer array

You are given an integer array. Find all the Pythagorean triplets in this array. Pythagorean triplets are 3 numbers a, b, c such that a^2+b^2=c^2.