import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class UrlTask{
public static void main(String[] args){
URL url;
try {
url = new URL("http://youtu.be/VKZ6Tmu9NWw?t=4m");
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String linha = "";
while ((linha = reader.readLine()) != null)
System.out.println(linha);
reader.close();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
URL url;
try {
url = new URL("http://youtu.be/VKZ6Tmu9NWw?t=4m");
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String linha = "";
while ((linha = reader.readLine()) != null)
System.out.println(linha);
reader.close();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Nenhum comentário:
Postar um comentário