BufferedReader br = new BufferedReader(isr); String s;String[] components; while((s = br.readLine()) != null) { components = s.split(" "); if (components.length > 2) { if (components[0].startsWith("v")) { vertices.add(Float.parseFloat(components[1])); vertices.add(Float.parseFloat(components[2])); vertices.add(Float.parseFloat(components[3])); } if (components[0].startsWith("f")) { for (int i = 1; i <= 3; i++) { String[] faceVertices = components[i].split("/"); for (int j = 0; j < 3; j++) { faces.add( (Byte)(byte)(Integer.parseInt(faceVertices[j]) - 1)); } } } }}