import java.net.*; import java.io.*; public class Output{ public static void main(String[] args) { try { BufferedWriter out = new BufferedWriter(new FileWriter("test.txt")); out.write("M\r\nping\r\n\r\ncount\r\n2\r\n5\r\n\r\n"); out.close(); } catch (IOException e) { e.printStackTrace(); } try { String line; BufferedReader in = new BufferedReader(new FileReader("steer.txt")); do { line=in.readLine(); System.out.println(line); if (line == null) break; String[] s = line.split("\t\t"); System.out.println("length: " + s.length); for(int i=0;i<3;i++) System.out.println(i + " " + s[i]); } while (true); in.close (); } catch (IOException e) { System.out.println ("IO exception =" + e ); } }//end main }