Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package mhd;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.List;
- import org.jsoup.Jsoup;
- import org.jsoup.nodes.Document;
- /**
- *
- * @author martrin100
- */
- public class Parser2 {
- private final String url;
- private Document doc;
- public Parser2(String url) {
- this.url = url;
- try {
- Jsoup.parse(new URL(url), 1000 * 5);
- }catch (MalformedURLException ex) {
- throw new IllegalArgumentException(String.format("Mallformed URL:%s",url));
- }
- catch (IOException ex) {
- throw new IllegalArgumentException(String.format("IO excception occured while downloading:%s",url));
- }
- }
- public static class Zastavka{
- public final String meno;
- public final int cas;
- public Zastavka(String meno, int cas) {
- this.meno = meno;
- this.cas = cas;
- }
- }
- public List<Zastavka> parseZastavky(){
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement