Download MrLeea/src/game/Tools (3).java from Beifengdo/Java-Programming: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/datasets/Beifengdo/Java-Programming/resolve/bdfc309a22fefa26bba0c1a3fce61ae261b14b58/MrLeea/src/game/Tools%20(3).java
- Command line
-
hf download 'hf://datasets/Beifengdo/Java-Programming@bdfc309a22fefa26bba0c1a3fce61ae261b14b58/MrLeea/src/game/Tools (3).java'
-
curl -L -o 'Tools (3).java' 'https://huggingface.co/datasets/Beifengdo/Java-Programming/resolve/bdfc309a22fefa26bba0c1a3fce61ae261b14b58/MrLeea/src/game/Tools%20(3).java'
363 Bytes
| package game; | |
| import java.awt.image.BufferedImage; | |
| import java.io.IOException; | |
| import javax.imageio.ImageIO; | |
| public class Tools {//工具类 | |
| public static BufferedImage getImg(String path) { | |
| BufferedImage img = null; | |
| try { | |
| img = ImageIO .read(Tools.class.getResource(path)); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } | |
| return img; | |
| } | |
| } | |