Untitled
unknown
plain_text
2 years ago
358 B
6
Indexable
static void saveImageFromUrl(String imageUrl, String fileName) throws IOException { URL url = new URL(imageUrl); Path savePath = Path.of("./saveScreen", fileName); if (!Files.exists(savePath)) { Files.createDirectories(savePath.getParent()); Files.copy(url.openStream(), savePath); } }
Editor is loading...