Manipulate BufferedImage.getRaster().getDataBuffer() directly.
example program

RasterTest.java.txt

Original image

Tweaked image (jpg)