String filenameTouseThumb = (String) contentResult.get("contentId") + nameOfThumb + ".jpg";
File outputImageFile = new File(imageServerPath + "/" + productId + "/" + filenameToUse);
OutputStream outputStream = new FileOutputStream(outputImageFile);
// *** Actual call to Watermarker#watermark(...) ***
new DefaultWatermarker().watermark(imageUrl, watermarkText, outputStream, watermarkerSettings);
String imageUrlResource = imageServerUrl + "/" + productId + "/" + filenameToUse;
BufferedImage bufNewImg = ImageIO.read(new File(imageServerPath + "/" + productId + "/" + filenameToUse));