List of usage examples for java.awt Image hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:org.wandora.utils.DataURL.java
public DataURL(Image image) throws MalformedURLException { File tempFile = null;/*from w w w .j a va2s . c o m*/ try { if (image != null) { String prefix = "wandora" + image.hashCode(); String suffix = ".png"; tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); ImageIO.write(UIBox.makeBufferedImage(image), "png", tempFile); mimetype = MimeTypes.getMimeType("png"); setData(Files.readAllBytes(tempFile.toPath())); } } catch (Exception e) { e.printStackTrace(); } }