code: public static BufferedImage read (InputStream in)
          throws IOException
      {
          return read(ByteBuffer.wrap(StreamUtil.toByteArray(in)));
      }
docs: Reads an image from the supplied input stream (which must return the image format previously
  written via a call to {@link #write}).
  
  @exception IOException thrown if an error occurs reading from the file.