I am running into some issues while wanting to write some text on an image. As I looked, it could be done with following code:
BufferedImage image = ImageIO.read(