InputStream thumbInputStream = imageAccessor .getThumbInputStream();
thumbInputStream = imageAccessor.getThumbInputStream();
    Image(String name, boolean isRepresentsSubdirectory, Folder folder,            IImageAccessor imageAccessor,ThumbNailInfo thumbNailInfo) throws GalleryException    {        this.name = name;        this.folder = folder;        this.isRepresentsSubdirectory = isRepresentsSubdirectory;        this.thumbNailInfo = thumbNailInfo;        lastModified = imageAccessor.getLastModified();        fileDate = DateFormat.getDateInstance().format(new Date(lastModified));        InputStream imageInputStream;        if (!isRepresentsSubdirectory)        {            try            {                // get image size using ImageInfo class                imageInputStream = imageAccessor.getImageInputStream();                ImageInfo ii = new ImageInfo();                ii.setInput(imageInputStream);                if (!ii.check()) { throw new GalleryException(                        "Not a supported image file format."); }                imageWidth = Integer.toString(ii.getWidth());                imageHeight = Integer.toString(ii.getHeight());                fileSize = Long.toString(imageAccessor.getLength());                //              get thumbnail image size using ImageInfo class                InputStream thumbInputStream = imageAccessor                        .getThumbInputStream();                ii = new ImageInfo();                ii.setInput(thumbInputStream);                if (!ii.check()) { throw new GalleryException(                        "Not a supported image file format."); }                thumbWidth = Integer.toString(ii.getWidth());                thumbHeight = Integer.toString(ii.getHeight());            }            catch (FileNotFoundException e)            {                throw new GalleryException(e.getMessage());            }            try            {                imageInputStream = imageAccessor.getImageInputStream();            }            catch (FileNotFoundException e)            {                throw new GalleryException(e.getMessage());            }            try            {                exif = new EXIFInfo(imageInputStream);            }            catch (GalleryException e1)            {                exif = null;            }        }    }