code: public static BufferedImage loadImage (InputStream iis, boolean useFastIO)
          throws IOException
      {
          if (iis == null) {
              return null;
          } else if (useFastIO) {
              return FastImageIO.read(iis);
          }
          return ImageIO.read(iis);
      }
docs: Loads an image from the given input stream. Supports formats supported by {@link ImageIO}
  as well as {@link FastImageIO} based on the useFastIO param.