I have a list of pictures here:
List<HtmlImage> picsa = (List<HtmlImage>) myPageww.getByXPath("//img[@alt]");
Then I save picture for picture:
for (int i2 = 0; i2 < picsa.size(); i2++) {
File imageFile = new File(dir + "/" + "bilder/" + i2 + ".jpg");
imageFile.mkdirs();
picsa.get(i2).saveAs(imageFile);
}
now my problem is, the list of pictures have a src=url......$_00.JPG
and I must change the $_00.JPG to $_000.JPG
but if I try to replace it
HtmlImage imageCap = picsa.get(i2).asText().replace("$_00", "$_000");
I become an error
incompatible types: String cannot be converted to HtmlImage
What can I do?