Download MrLeea/src/game/Tools (2).java from Beifengdo/Java-Programming: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/datasets/Beifengdo/Java-Programming/resolve/ea096ef5332b31ae7bc908968a813c285f9b09ec/MrLeea/src/game/Tools%20(2).java
- Command line
-
hf download 'hf://datasets/Beifengdo/Java-Programming@ea096ef5332b31ae7bc908968a813c285f9b09ec/MrLeea/src/game/Tools (2).java'
-
curl -L -o 'Tools (2).java' 'https://huggingface.co/datasets/Beifengdo/Java-Programming/resolve/ea096ef5332b31ae7bc908968a813c285f9b09ec/MrLeea/src/game/Tools%20(2).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; | |
| } | |
| } | |