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

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -