I can choose between one of these lines to send an image to my ftp server:
ftp.stor(new FileInputStream(new File("img.jpg")), "img.jpg");
But all I have is a BufferedImage called bimg. How can I create a jpg out of that bimg or send the BufferedImage as jpg in one of those three lines?
Note: I will use this application on my server so I cannot first save it and then send it.