2
我測試了這一刻。這是在ip camera上拍攝的照片。URL.openStream()沒有迴應
public static void main(String[] args) throws Exception {
URL url = new URL("http://192.168.1.210:5500/snapshot.cgi?user=admin&pwd=123456");
InputStream is = url.openStream();
BufferedImage image = null;
image = ImageIO.read(is);
is.close();
}
我的問題是這樣一行:「InputStream is = url.openStream();」我知道我的地址是錯誤的,但它保持阻止,我沒有錯誤或別的東西。有人有一個想法解決我的問題?提前致謝。
是的我知道,但與此我不知道更改inputStream()BufferedImage – blackcat18
我不明白你的意思。你不能像上面的例子那樣繼續嗎? 'BufferedImage image = ImageIO.read(is)' – Sentry
不,因爲我不知道相機的地址是否正確 – blackcat18