java - Conditional statement within readline() method -


so, fileinputstreaming .xml file(name ini--which contains list of .txt files). however, want .txt files in .xml file. how go doing that? appreciate feedback. thanks.

filereader filereader = new filereader(new file("ini.xml"));  bufferedreader br = new bufferedreader(filereader);   while ((line = br.readline()) != null) {     // reading lines till no more lines     //however ....want place if or line contains method specify .txt files. 

your feedback appreciated.

assuming each line contains file name test see if string ends .xml

while ((line = br.readline()) != null) {          if (line.tolowercase().endswith (".xml")) continue  } 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -