java - Line Number Reader -


i got problems code

window.videoinfo.addactionlistener(new actionlistener() {      public void actionperformed(actionevent e) {       try {       url url = new url(window.videoinput.gettext());      urlconnection con = url.openconnection();     linenumberreader in = new linenumberreader(new inputstreamreader(con.getinputstream()));    in.setlinenumber(1523);    in.getlinenumber();        system.out.print(in.readline());       } catch (ioexception ex) {         ex.printstacktrace();        } 

i trying display specific line website. if press button displays first line. when set line number 1523.

setlinenumber(1523) makes line number returned getlinenumber() starts 1523. won't skip 1523 lines. skip 1523 lines, need do:

for(int = 0; < 1523; i++)     in.readline(); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -