I am currently trying to refactor the getRGB,getSubimage and setRGB methods in the BufferedImage class. I am fairly new to Java and want to create good code; the problem is my parameter list is becoming very long and is causing problems for me. I found the parameter object as a solution however I am struggling to implement it.
Can I get a representation of how the following method can be improved with a parameter object;
public void setRGB(int startX,
int startY,
int w,
int h,
int[] rgbArray,
int offset,
int scansize)