code: public static BufferedImage read (File file)
          throws IOException
      {
          RandomAccessFile raf = new RandomAccessFile(file, "r");
          FileChannel fchan = raf.getChannel();
  
          try {
              MappedByteBuffer mbuf = fchan.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
              return read(mbuf);
          } finally {
              fchan.close();
              raf.close();
          }
      }
docs: Reads an image from the supplied file (which must contain an image previously written via a
  call to {@link #write}).
  
  @exception IOException thrown if an error occurs reading from the file.