This used to work and now it isn't working. I didn't change the portion where the Image is suppose to stream so I don't know why this isn't working. Here's a snippet of my code:
File f = new File(filepath);
applicantImage=new ImageDetail(filepath);
Iterator<ImageReader> readers =
ImageIO.getImageReadersBySuffix(applicantImage.getFile_extension());
ImageReader reader = readers.next();
ImageInputStream iis = ImageIO.createImageInputStream(f);
filepath
is the absolute filepath to the image and the image is confirmed to be at that location on the server. Everything works all fine and dandy until it gets to ImageIO.createImageInputStream(f)
. It is returning null
now. I read javadoc that it takes in a File. So why is it returning a null
now? Anyone know? None of the codes posted above were changed in my editing so I don't understand why it worked before the change and why it doesn't work now. Any help is much appreciated! Thanks!