I've got,

String[] stringArray = {}; //for storing desired contents
String line = reader.readLine(); //read lines
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream()));

if (line.contains("Name")) //my condition. Result to be stored in array


Any help here? How do I make use of a for-loop to store my result into the array?