We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed8de4e commit d10d5a0Copy full SHA for d10d5a0
src/simplejavacalculator/BufferedImageCustom.java
@@ -0,0 +1,25 @@
1
+package simplejavacalculator;
2
+
3
+import java.io.*;
4
+import java.awt.image.BufferedImage;
5
+import javax.imageio.ImageIO;
6
+import java.awt.*;
7
8
+/**
9
+ *This class will return an image
10
+ *from a binary data.
11
+ */
12
+class BufferedImageCustom {
13
+ public Image imageReturn()
14
+ throws IOException {
15
+ Image image;
16
17
+ //the image here is not even an image file
18
+ //but rather a binary data
19
+ InputStream bis = getClass().getResourceAsStream("/icon/icon.png");
20
+ BufferedImage bImage2 = ImageIO.read(bis);
21
+ image = bImage2;
22
23
+ return image;
24
+ }
25
+}
0 commit comments