Added java code to take screenshot and interpret the pixel data.