mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-30 07:33:45 +00:00
Update 设计模式 - 代理.md
URL 改用 URI.create().toURL() 创建。
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ public class ImageViewer {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String image = "http://image.jpg";
|
||||
URL url = new URL(image);
|
||||
URL url = URI.create(image).toURL();
|
||||
HighResolutionImage highResolutionImage = new HighResolutionImage(url);
|
||||
ImageProxy imageProxy = new ImageProxy(highResolutionImage);
|
||||
imageProxy.showImage();
|
||||
|
||||
Reference in New Issue
Block a user