Thanks to the comment on my original question, I found the answer.
Looking at the result of BufferedImage.getType()
along with JavaDoc, will help you determine the mapping of the colors in the byte[]
array.
In my case, the type of the image was TYPE_3BYTE_BGR
which according to Java documentation, is stored as interleaved Blue, Green, Red in 3 consecutive byte elements.
Hope this helps others :-)