The BufferedImage class has two getRGB() methods. The one getRGB(x,y) returns an int in the form of an RGB value. Comparing ints is more straightforward than comparing arrays so I would stick with that. The Color class provides a constructor to convert R,G, and B values to an int. Or you can employ a simple shift and or construct. As Norm says, passing an array of RGB values and the image would be one way to go. But scanning an image over and over again is not very efficient. Once you get it working you may want to develop an algorithm to speed up the search (say by doing some sort of pre-processing on the image data that better lends itself to searching). It all depends on your requirements.
Regards,
Jim