java - Breaking out of a do while loop in an async task after parsing all data in a URLConnection -


how end while loop if there 1 line of data or if next line empty?

    bufferedreader in = new bufferedreader(new inputstreamreader(is));     string inputline = "";      try {         {             jsondata += inputline;         }      }         while ((inputline = in.readline()) != null);     } 

you can use,

while ((inputline = in.readline()) != null && !inputline.isempty()); 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -