A head start it is, then. Assuming that you have access to each individual pixel in the negative image, and that each pixel has components RGB, obtain the RGB components of the original pixels like this:
int originalRed = Math.abs( pixel.getRed( ) - 255 );
int originalGreen = Math.abs( pixel.getGreen( ) - 255 );
int originalBlue = Math.abs( pixel.getBlue( ) - 255 );
// now build the original pixel using the RGB components
Doing the above for each pixel, you can obtain the original image by recreating it pixel-by-pixel.