java - ArrayIndexOutOfBounds when reading a file Android -



java - ArrayIndexOutOfBounds when reading a file Android -

i trying read file in application content of file looks this:

0 1 1 0 0 2 2 0 ...

when read file arrayindexoutofbounds exception how read file:

assetmanager amanager ; string word = null; seek { amanager= getassets(); inputstream inputstream = amanager.open("edges.txt"); inputstreamreader streamreader = new inputstreamreader(inputstream); bufferedreader breader = new bufferedreader(streamreader); //word while((word=breader.readline()) != null){ string s = breader.readline(); string[] words =s.split(" "); string sx = words[0]; string sy = words[1]; // ---line 200, line exception system.out.println(sx); system.out.println(sy); } breader.close(); } grab (ioexception e2) { // todo auto-generated grab block e2.printstacktrace(); }

it reads string sx = words[0];

i have tried initializing string[] word = new string[500]; didn't help.

this in logcat:

04-08 20:55:21.096: d/dalvikvm(1038): gc_external_alloc freed 69k, 49% free 2753k/5379k, external 1625k/2137k, paused 13ms 04-08 20:55:21.140: d/(1038): hostconnection::get() new host connection established 0x92f2638, tid 1038 04-08 20:55:28.404: w/keycharactermap(1038): no keyboard id 0 04-08 20:55:28.404: w/keycharactermap(1038): using default keymap: /system/usr/keychars/qwerty.kcm.bin 04-08 20:55:35.712: i/system.out(1038): 1 04-08 20:55:35.712: i/system.out(1038): 0 04-08 20:55:35.716: i/system.out(1038): 2 04-08 20:55:35.720: i/system.out(1038): 0 04-08 20:55:35.720: i/system.out(1038): 69 04-08 20:55:35.724: i/system.out(1038): 0 04-08 20:55:35.724: i/system.out(1038): 2 04-08 20:55:35.724: i/system.out(1038): 1 04-08 20:55:35.724: i/system.out(1038): 69 04-08 20:55:35.724: i/system.out(1038): 1 04-08 20:55:35.724: i/system.out(1038): 3 04-08 20:55:35.724: i/system.out(1038): 2 04-08 20:55:35.724: i/system.out(1038): 4 04-08 20:55:35.724: i/system.out(1038): 3 04-08 20:55:35.724: i/system.out(1038): 5 04-08 20:55:35.724: i/system.out(1038): 4 04-08 20:55:35.724: i/system.out(1038): 6 04-08 20:55:35.724: i/system.out(1038): 5 04-08 20:55:35.728: i/system.out(1038): 7 04-08 20:55:35.728: i/system.out(1038): 5 04-08 20:55:35.728: i/system.out(1038): 7 04-08 20:55:35.728: i/system.out(1038): 6 04-08 20:55:35.728: i/system.out(1038): 8 04-08 20:55:35.728: i/system.out(1038): 6 04-08 20:55:35.728: i/system.out(1038): 8 04-08 20:55:35.728: i/system.out(1038): 7 04-08 20:55:35.728: i/system.out(1038): 10 04-08 20:55:35.728: i/system.out(1038): 8 04-08 20:55:35.728: i/system.out(1038): 10 04-08 20:55:35.728: i/system.out(1038): 9 04-08 20:55:35.728: i/system.out(1038): 11 04-08 20:55:35.728: i/system.out(1038): 9 04-08 20:55:35.728: i/system.out(1038): 11 04-08 20:55:35.732: i/system.out(1038): 10 04-08 20:55:35.732: i/system.out(1038): 12 04-08 20:55:35.732: i/system.out(1038): 9 04-08 20:55:35.732: i/system.out(1038): 13 04-08 20:55:35.732: i/system.out(1038): 9 04-08 20:55:35.732: i/system.out(1038): 12 04-08 20:55:35.732: i/system.out(1038): 11 04-08 20:55:35.732: i/system.out(1038): 15 04-08 20:55:35.732: i/system.out(1038): 12 04-08 20:55:35.732: i/system.out(1038): 14 04-08 20:55:35.732: i/system.out(1038): 13 04-08 20:55:35.732: i/system.out(1038): 15 04-08 20:55:35.732: i/system.out(1038): 13 04-08 20:55:35.732: i/system.out(1038): 16 04-08 20:55:35.732: i/system.out(1038): 14 04-08 20:55:35.732: i/system.out(1038): 17 04-08 20:55:35.732: i/system.out(1038): 14 04-08 20:55:35.732: i/system.out(1038): 16 04-08 20:55:35.740: i/system.out(1038): 15 04-08 20:55:35.740: i/system.out(1038): 17 04-08 20:55:35.740: i/system.out(1038): 16 04-08 20:55:35.740: i/system.out(1038): 18 04-08 20:55:35.740: i/system.out(1038): 17 04-08 20:55:35.740: i/system.out(1038): 19 04-08 20:55:35.740: i/system.out(1038): 18 04-08 20:55:35.740: i/system.out(1038): 20 04-08 20:55:35.740: i/system.out(1038): 19 04-08 20:55:35.740: i/system.out(1038): 21 04-08 20:55:35.744: i/system.out(1038): 20 04-08 20:55:35.744: i/system.out(1038): 22 04-08 20:55:35.744: i/system.out(1038): 21 04-08 20:55:35.744: i/system.out(1038): 23 04-08 20:55:35.744: i/system.out(1038): 21 04-08 20:55:35.744: i/system.out(1038): 23 04-08 20:55:35.744: i/system.out(1038): 20 04-08 20:55:35.744: i/system.out(1038): 23 04-08 20:55:35.744: i/system.out(1038): 22 04-08 20:55:35.744: i/system.out(1038): 24 04-08 20:55:35.744: i/system.out(1038): 23 04-08 20:55:35.744: i/system.out(1038): 25 04-08 20:55:35.744: i/system.out(1038): 24 04-08 20:55:35.744: i/system.out(1038): 26 04-08 20:55:35.744: i/system.out(1038): 25 04-08 20:55:35.744: i/system.out(1038): 27 04-08 20:55:35.744: i/system.out(1038): 25 04-08 20:55:35.744: i/system.out(1038): 27 04-08 20:55:35.744: i/system.out(1038): 26 04-08 20:55:35.744: i/system.out(1038): 28 04-08 20:55:35.744: i/system.out(1038): 27 04-08 20:55:35.748: i/system.out(1038): 29 04-08 20:55:35.748: i/system.out(1038): 28 04-08 20:55:35.748: i/system.out(1038): 30 04-08 20:55:35.748: i/system.out(1038): 29 04-08 20:55:35.748: i/system.out(1038): 31 04-08 20:55:35.748: i/system.out(1038): 30 04-08 20:55:35.748: i/system.out(1038): 32 04-08 20:55:35.748: i/system.out(1038): 30 04-08 20:55:35.748: i/system.out(1038): 32 04-08 20:55:35.748: i/system.out(1038): 31 04-08 20:55:35.748: i/system.out(1038): 33 04-08 20:55:35.748: i/system.out(1038): 32 04-08 20:55:35.748: i/system.out(1038): 34 04-08 20:55:35.748: i/system.out(1038): 33 04-08 20:55:35.752: i/system.out(1038): 35 04-08 20:55:35.752: i/system.out(1038): 33 04-08 20:55:35.752: i/system.out(1038): 35 04-08 20:55:35.752: i/system.out(1038): 34 04-08 20:55:35.752: i/system.out(1038): 36 04-08 20:55:35.752: i/system.out(1038): 35 04-08 20:55:35.752: i/system.out(1038): 37 04-08 20:55:35.752: i/system.out(1038): 36 04-08 20:55:35.752: i/system.out(1038): 38 04-08 20:55:35.752: i/system.out(1038): 37 04-08 20:55:35.752: i/system.out(1038): 39 04-08 20:55:35.752: i/system.out(1038): 38 04-08 20:55:35.752: i/system.out(1038): 40 04-08 20:55:35.752: i/system.out(1038): 39 04-08 20:55:35.752: i/system.out(1038): 41 04-08 20:55:35.752: i/system.out(1038): 39 04-08 20:55:35.760: i/system.out(1038): 42 04-08 20:55:35.760: i/system.out(1038): 40 04-08 20:55:35.760: i/system.out(1038): 43 04-08 20:55:35.760: i/system.out(1038): 40 04-08 20:55:35.760: i/system.out(1038): 43 04-08 20:55:35.760: i/system.out(1038): 42 04-08 20:55:35.760: i/system.out(1038): 44 04-08 20:55:35.764: i/system.out(1038): 43 04-08 20:55:35.764: i/system.out(1038): 45 04-08 20:55:35.764: i/system.out(1038): 44 04-08 20:55:35.764: i/system.out(1038): 46 04-08 20:55:35.764: i/system.out(1038): 45 04-08 20:55:35.764: i/system.out(1038): 47 04-08 20:55:35.764: i/system.out(1038): 46 04-08 20:55:35.764: i/system.out(1038): 48 04-08 20:55:35.764: i/system.out(1038): 47 04-08 20:55:35.764: i/system.out(1038): 49 04-08 20:55:35.768: i/system.out(1038): 48 04-08 20:55:35.768: i/system.out(1038): 50 04-08 20:55:35.768: i/system.out(1038): 48 04-08 20:55:35.768: i/system.out(1038): 51 04-08 20:55:35.772: i/system.out(1038): 49 04-08 20:55:35.772: i/system.out(1038): 51 04-08 20:55:35.772: i/system.out(1038): 50 04-08 20:55:35.776: i/system.out(1038): 52 04-08 20:55:35.776: i/system.out(1038): 50 04-08 20:55:35.776: i/system.out(1038): 54 04-08 20:55:35.776: i/system.out(1038): 51 04-08 20:55:35.776: i/system.out(1038): 53 04-08 20:55:35.776: i/system.out(1038): 52 04-08 20:55:35.776: i/system.out(1038): 55 04-08 20:55:35.776: i/system.out(1038): 53 04-08 20:55:35.776: i/system.out(1038): 55 04-08 20:55:35.776: i/system.out(1038): 54 04-08 20:55:35.776: i/system.out(1038): 57 04-08 20:55:35.776: i/system.out(1038): 54 04-08 20:55:35.776: i/system.out(1038): 56 04-08 20:55:35.776: i/system.out(1038): 55 04-08 20:55:35.776: i/system.out(1038): 57 04-08 20:55:35.776: i/system.out(1038): 56 04-08 20:55:35.776: i/system.out(1038): 58 04-08 20:55:35.776: i/system.out(1038): 56 04-08 20:55:35.776: i/system.out(1038): 60 04-08 20:55:35.776: i/system.out(1038): 57 04-08 20:55:35.776: i/system.out(1038): 59 04-08 20:55:35.780: i/system.out(1038): 58 04-08 20:55:35.780: i/system.out(1038): 60 04-08 20:55:35.780: i/system.out(1038): 59 04-08 20:55:35.780: i/system.out(1038): 61 04-08 20:55:35.780: i/system.out(1038): 59 04-08 20:55:35.780: i/system.out(1038): 62 04-08 20:55:35.780: i/system.out(1038): 61 04-08 20:55:35.780: i/system.out(1038): 63 04-08 20:55:35.780: i/system.out(1038): 62 04-08 20:55:35.784: i/system.out(1038): 64 04-08 20:55:35.784: i/system.out(1038): 63 04-08 20:55:35.784: i/system.out(1038): 65 04-08 20:55:35.784: i/system.out(1038): 64 04-08 20:55:35.784: i/system.out(1038): 66 04-08 20:55:35.784: i/system.out(1038): 65 04-08 20:55:35.784: i/system.out(1038): 67 04-08 20:55:35.788: i/system.out(1038): 66 04-08 20:55:35.788: i/system.out(1038): 68 04-08 20:55:35.788: i/system.out(1038): 67 04-08 20:55:35.788: i/system.out(1038): 69 04-08 20:55:35.788: i/system.out(1038): 68 04-08 20:55:35.788: i/system.out(1038): 70 04-08 20:55:35.788: i/system.out(1038): 69 04-08 20:55:35.788: d/androidruntime(1038): shutting downwards vm 04-08 20:55:35.788: w/dalvikvm(1038): threadid=1: thread exiting uncaught exception (group=0xb5fac4f0) 04-08 20:55:35.792: e/androidruntime(1038): fatal exception: main 04-08 20:55:35.792: e/androidruntime(1038): java.lang.runtimeexception: unable start activity componentinfo{com.example.helloworld3/com.example.helloworld3.floorplan}: java.lang.arrayindexoutofboundsexception 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread.performlaunchactivity(activitythread.java:1647) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1663) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread.access$1500(activitythread.java:117) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread$h.handlemessage(activitythread.java:931) 04-08 20:55:35.792: e/androidruntime(1038): @ android.os.handler.dispatchmessage(handler.java:99) 04-08 20:55:35.792: e/androidruntime(1038): @ android.os.looper.loop(looper.java:130) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread.main(activitythread.java:3683) 04-08 20:55:35.792: e/androidruntime(1038): @ java.lang.reflect.method.invokenative(native method) 04-08 20:55:35.792: e/androidruntime(1038): @ java.lang.reflect.method.invoke(method.java:507) 04-08 20:55:35.792: e/androidruntime(1038): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:839) 04-08 20:55:35.792: e/androidruntime(1038): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:597) 04-08 20:55:35.792: e/androidruntime(1038): @ dalvik.system.nativestart.main(native method) 04-08 20:55:35.792: e/androidruntime(1038): caused by: java.lang.arrayindexoutofboundsexception 04-08 20:55:35.792: e/androidruntime(1038): @ com.example.helloworld3.floorplan.oncreate(floorplan.java:200) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) 04-08 20:55:35.792: e/androidruntime(1038): @ android.app.activitythread.performlaunchactivity(activitythread.java:1611) 04-08 20:55:35.792: e/androidruntime(1038): ... 11 more

edit :

this log when read line without splitting :

04-08 21:11:27.520: d/dalvikvm(1151): gc_external_alloc freed 72k, 49% free 2753k/5379k, external 1625k/2137k, paused 28ms 04-08 21:11:27.612: d/(1151): hostconnection::get() new host connection established 0x92f2520, tid 1151 04-08 21:11:34.356: w/keycharactermap(1151): no keyboard id 0 04-08 21:11:34.356: w/keycharactermap(1151): using default keymap: /system/usr/keychars/qwerty.kcm.bin 04-08 21:11:45.796: i/system.out(1151): 0 1 04-08 21:11:45.796: i/system.out(1151): 1 0 04-08 21:11:45.796: i/system.out(1151): 0 2 04-08 21:11:45.803: i/system.out(1151): 2 0 04-08 21:11:45.805: i/system.out(1151): 0 69 04-08 21:11:45.805: i/system.out(1151): 69 0 04-08 21:11:45.805: i/system.out(1151): 1 2 04-08 21:11:45.805: i/system.out(1151): 2 1 04-08 21:11:45.805: i/system.out(1151): 1 69 04-08 21:11:45.805: i/system.out(1151): 69 1 04-08 21:11:45.805: i/system.out(1151): 2 3 04-08 21:11:45.805: i/system.out(1151): 3 2 04-08 21:11:45.812: i/system.out(1151): 3 4 04-08 21:11:45.812: i/system.out(1151): 4 3 04-08 21:11:45.812: i/system.out(1151): 4 5 04-08 21:11:45.812: i/system.out(1151): 5 4 04-08 21:11:45.812: i/system.out(1151): 5 6 04-08 21:11:45.812: i/system.out(1151): 6 5 04-08 21:11:45.812: i/system.out(1151): 5 7 04-08 21:11:45.812: i/system.out(1151): 7 5 04-08 21:11:45.812: i/system.out(1151): 6 7 04-08 21:11:45.812: i/system.out(1151): 7 6 04-08 21:11:45.812: i/system.out(1151): 6 8 04-08 21:11:45.812: i/system.out(1151): 8 6 04-08 21:11:45.812: i/system.out(1151): 7 8 04-08 21:11:45.816: i/system.out(1151): 8 7 04-08 21:11:45.816: i/system.out(1151): 8 10 04-08 21:11:45.825: i/system.out(1151): 10 8 04-08 21:11:45.825: i/system.out(1151): 9 10 04-08 21:11:45.828: i/system.out(1151): 10 9 04-08 21:11:45.832: i/system.out(1151): 9 11 04-08 21:11:45.832: i/system.out(1151): 11 9 04-08 21:11:45.832: i/system.out(1151): 10 11 04-08 21:11:45.832: i/system.out(1151): 11 10 04-08 21:11:45.832: i/system.out(1151): 9 12 04-08 21:11:45.836: i/system.out(1151): 12 9 04-08 21:11:45.840: i/system.out(1151): 9 13 04-08 21:11:45.840: i/system.out(1151): 13 9 04-08 21:11:45.840: i/system.out(1151): 11 12 04-08 21:11:45.840: i/system.out(1151): 12 11 04-08 21:11:45.840: i/system.out(1151): 12 15 04-08 21:11:45.852: i/system.out(1151): 15 12 04-08 21:11:45.852: i/system.out(1151): 13 14 04-08 21:11:45.852: i/system.out(1151): 14 13 04-08 21:11:45.852: i/system.out(1151): 13 15 04-08 21:11:45.852: i/system.out(1151): 15 13 04-08 21:11:45.852: i/system.out(1151): 14 16 04-08 21:11:45.852: i/system.out(1151): 16 14 04-08 21:11:45.852: i/system.out(1151): 14 17 04-08 21:11:45.852: i/system.out(1151): 17 14 04-08 21:11:45.852: i/system.out(1151): 15 16 04-08 21:11:45.852: i/system.out(1151): 16 15 04-08 21:11:45.852: i/system.out(1151): 16 17 04-08 21:11:45.852: i/system.out(1151): 17 16 04-08 21:11:45.852: i/system.out(1151): 17 18 04-08 21:11:45.852: i/system.out(1151): 18 17 04-08 21:11:45.852: i/system.out(1151): 18 19 04-08 21:11:45.852: i/system.out(1151): 19 18 04-08 21:11:45.852: i/system.out(1151): 19 20 04-08 21:11:45.852: i/system.out(1151): 20 19 04-08 21:11:45.852: i/system.out(1151): 20 21 04-08 21:11:45.852: i/system.out(1151): 21 20 04-08 21:11:45.852: i/system.out(1151): 21 22 04-08 21:11:45.852: i/system.out(1151): 22 21 04-08 21:11:45.852: i/system.out(1151): 21 23 04-08 21:11:45.852: i/system.out(1151): 23 21 04-08 21:11:45.852: i/system.out(1151): 20 23 04-08 21:11:45.852: i/system.out(1151): 23 20 04-08 21:11:45.852: i/system.out(1151): 22 23 04-08 21:11:45.852: i/system.out(1151): 23 22 04-08 21:11:45.852: i/system.out(1151): 23 24 04-08 21:11:45.852: i/system.out(1151): 24 23 04-08 21:11:45.852: i/system.out(1151): 24 25 04-08 21:11:45.852: i/system.out(1151): 25 24 04-08 21:11:45.852: i/system.out(1151): 25 26 04-08 21:11:45.852: i/system.out(1151): 26 25 04-08 21:11:45.852: i/system.out(1151): 25 27 04-08 21:11:45.852: i/system.out(1151): 27 25 04-08 21:11:45.852: i/system.out(1151): 26 27 04-08 21:11:45.852: i/system.out(1151): 27 26 04-08 21:11:45.852: i/system.out(1151): 27 28 04-08 21:11:45.860: i/system.out(1151): 28 27 04-08 21:11:45.860: i/system.out(1151): 28 29 04-08 21:11:45.864: i/system.out(1151): 29 28 04-08 21:11:45.864: i/system.out(1151): 29 30 04-08 21:11:45.868: i/system.out(1151): 30 29 04-08 21:11:45.876: i/system.out(1151): 30 31 04-08 21:11:45.876: i/system.out(1151): 31 30 04-08 21:11:45.876: i/system.out(1151): 30 32 04-08 21:11:45.876: i/system.out(1151): 32 30 04-08 21:11:45.876: i/system.out(1151): 31 32 04-08 21:11:45.876: i/system.out(1151): 32 31 04-08 21:11:45.876: i/system.out(1151): 32 33 04-08 21:11:45.876: i/system.out(1151): 33 32 04-08 21:11:45.876: i/system.out(1151): 33 34 04-08 21:11:45.876: i/system.out(1151): 34 33 04-08 21:11:45.876: i/system.out(1151): 33 35 04-08 21:11:45.876: i/system.out(1151): 35 33 04-08 21:11:45.876: i/system.out(1151): 34 35 04-08 21:11:45.876: i/system.out(1151): 35 34 04-08 21:11:45.876: i/system.out(1151): 35 36 04-08 21:11:45.876: i/system.out(1151): 36 35 04-08 21:11:45.876: i/system.out(1151): 36 37 04-08 21:11:45.876: i/system.out(1151): 37 36 04-08 21:11:45.876: i/system.out(1151): 37 38 04-08 21:11:45.876: i/system.out(1151): 38 37 04-08 21:11:45.876: i/system.out(1151): 38 39 04-08 21:11:45.876: i/system.out(1151): 39 38 04-08 21:11:45.876: i/system.out(1151): 39 40 04-08 21:11:45.876: i/system.out(1151): 40 39 04-08 21:11:45.876: i/system.out(1151): 39 41 04-08 21:11:45.876: i/system.out(1151): 41 39 04-08 21:11:45.876: i/system.out(1151): 40 42 04-08 21:11:45.876: i/system.out(1151): 42 40 04-08 21:11:45.876: i/system.out(1151): 40 43 04-08 21:11:45.876: i/system.out(1151): 43 40 04-08 21:11:45.876: i/system.out(1151): 42 43 04-08 21:11:45.876: i/system.out(1151): 43 42 04-08 21:11:45.876: i/system.out(1151): 43 44 04-08 21:11:45.876: i/system.out(1151): 44 43 04-08 21:11:45.876: i/system.out(1151): 44 45 04-08 21:11:45.876: i/system.out(1151): 45 44 04-08 21:11:45.876: i/system.out(1151): 45 46 04-08 21:11:45.876: i/system.out(1151): 46 45 04-08 21:11:45.876: i/system.out(1151): 46 47 04-08 21:11:45.876: i/system.out(1151): 47 46 04-08 21:11:45.876: i/system.out(1151): 47 48 04-08 21:11:45.876: i/system.out(1151): 48 47 04-08 21:11:45.876: i/system.out(1151): 48 49 04-08 21:11:45.876: i/system.out(1151): 49 48 04-08 21:11:45.876: i/system.out(1151): 48 50 04-08 21:11:45.876: i/system.out(1151): 50 48 04-08 21:11:45.876: i/system.out(1151): 49 51 04-08 21:11:45.876: i/system.out(1151): 51 49 04-08 21:11:45.876: i/system.out(1151): 50 51 04-08 21:11:45.876: i/system.out(1151): 51 50 04-08 21:11:45.876: i/system.out(1151): 50 52 04-08 21:11:45.876: i/system.out(1151): 52 50 04-08 21:11:45.876: i/system.out(1151): 51 54 04-08 21:11:45.876: i/system.out(1151): 54 51 04-08 21:11:45.876: i/system.out(1151): 52 53 04-08 21:11:45.876: i/system.out(1151): 53 52 04-08 21:11:45.876: i/system.out(1151): 53 55 04-08 21:11:45.876: i/system.out(1151): 55 53 04-08 21:11:45.876: i/system.out(1151): 54 55 04-08 21:11:45.876: i/system.out(1151): 55 54 04-08 21:11:45.876: i/system.out(1151): 54 57 04-08 21:11:45.876: i/system.out(1151): 57 54 04-08 21:11:45.876: i/system.out(1151): 55 56 04-08 21:11:45.876: i/system.out(1151): 56 55 04-08 21:11:45.876: i/system.out(1151): 56 57 04-08 21:11:45.876: i/system.out(1151): 57 56 04-08 21:11:45.876: i/system.out(1151): 56 58 04-08 21:11:45.876: i/system.out(1151): 58 56 04-08 21:11:45.876: i/system.out(1151): 57 60 04-08 21:11:45.876: i/system.out(1151): 60 57 04-08 21:11:45.876: i/system.out(1151): 58 59 04-08 21:11:45.876: i/system.out(1151): 59 58 04-08 21:11:45.876: i/system.out(1151): 59 60 04-08 21:11:45.876: i/system.out(1151): 60 59 04-08 21:11:45.876: i/system.out(1151): 59 61 04-08 21:11:45.876: i/system.out(1151): 61 59 04-08 21:11:45.876: i/system.out(1151): 61 62 04-08 21:11:45.876: i/system.out(1151): 62 61 04-08 21:11:45.876: i/system.out(1151): 62 63 04-08 21:11:45.876: i/system.out(1151): 63 62 04-08 21:11:45.876: i/system.out(1151): 63 64 04-08 21:11:45.876: i/system.out(1151): 64 63 04-08 21:11:45.876: i/system.out(1151): 64 65 04-08 21:11:45.876: i/system.out(1151): 65 64 04-08 21:11:45.876: i/system.out(1151): 65 66 04-08 21:11:45.876: i/system.out(1151): 66 65 04-08 21:11:45.876: i/system.out(1151): 66 67 04-08 21:11:45.876: i/system.out(1151): 67 66 04-08 21:11:45.876: i/system.out(1151): 67 68 04-08 21:11:45.876: i/system.out(1151): 68 67 04-08 21:11:45.876: i/system.out(1151): 68 69 04-08 21:11:45.876: i/system.out(1151): 69 68 04-08 21:11:45.876: i/system.out(1151): 69 70 04-08 21:11:45.876: i/system.out(1151): 70 69 04-08 21:11:45.876: i/system.out(1151): 04-08 21:11:45.893: w/system.err(1151): java.io.filenotfoundexception: /data/data/com.example.helloworld3/files/taitfirstponts.xml (no such file or directory) 04-08 21:11:45.893: w/system.err(1151): @ org.apache.harmony.luni.platform.osfilesystem.open(native method) 04-08 21:11:45.893: w/system.err(1151): @ dalvik.system.blockguard$wrappedfilesystem.open(blockguard.java:232) 04-08 21:11:45.893: w/system.err(1151): @ java.io.fileinputstream.<init>(fileinputstream.java:80) 04-08 21:11:45.893: w/system.err(1151): @ android.app.contextimpl.openfileinput(contextimpl.java:412) 04-08 21:11:45.893: w/system.err(1151): @ android.content.contextwrapper.openfileinput(contextwrapper.java:152) 04-08 21:11:45.893: w/system.err(1151): @ com.example.helloworld3.floorplan.oncreate(floorplan.java:217) 04-08 21:11:45.893: w/system.err(1151): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) 04-08 21:11:45.893: w/system.err(1151): @ android.app.activitythread.performlaunchactivity(activitythread.java:1611) 04-08 21:11:45.893: w/system.err(1151): @ android.app.activitythread.handlelaunchactivity(activitythread.java:1663) 04-08 21:11:45.904: w/system.err(1151): @ android.app.activitythread.access$1500(activitythread.java:117) 04-08 21:11:45.904: w/system.err(1151): @ android.app.activitythread$h.handlemessage(activitythread.java:931) 04-08 21:11:45.904: w/system.err(1151): @ android.os.handler.dispatchmessage(handler.java:99) 04-08 21:11:45.904: w/system.err(1151): @ android.os.looper.loop(looper.java:130) 04-08 21:11:45.904: w/system.err(1151): @ android.app.activitythread.main(activitythread.java:3683) 04-08 21:11:45.904: w/system.err(1151): @ java.lang.reflect.method.invokenative(native method) 04-08 21:11:45.904: w/system.err(1151): @ java.lang.reflect.method.invoke(method.java:507) 04-08 21:11:45.904: w/system.err(1151): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:839) 04-08 21:11:45.904: w/system.err(1151): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:597) 04-08 21:11:45.904: w/system.err(1151): @ dalvik.system.nativestart.main(native method) 04-08 21:11:45.936: d/dalvikvm(1151): gc_external_alloc freed 158k, 48% free 2911k/5575k, external 2425k/2961k, paused 32ms 04-08 21:11:46.036: i/system.out(1151): c201 04-08 21:11:46.036: i/system.out(1151): 51 04-08 21:11:46.040: i/system.out(1151): 89 04-08 21:11:46.040: i/system.out(1151): c2exit5 04-08 21:11:46.040: i/system.out(1151): 42 04-08 21:11:46.040: i/system.out(1151): 164 04-08 21:11:46.040: i/system.out(1151): c1exit1 04-08 21:11:46.040: i/system.out(1151): 52 04-08 21:11:46.040: i/system.out(1151): 174 04-08 21:11:46.040: i/system.out(1151): c108 04-08 21:11:46.040: i/system.out(1151): 51 04-08 21:11:46.040: i/system.out(1151): 89 04-08 21:11:46.160: i/system.out(1151): c201 04-08 21:11:46.160: i/system.out(1151): c2exit5 04-08 21:11:46.160: i/system.out(1151): 52.0 04-08 21:11:46.160: i/system.out(1151): 174.0 04-08 21:11:46.160: i/system.out(1151): 51.0 04-08 21:11:46.160: i/system.out(1151): 89.0

thank help!

readline() reads line.

you checking if next line not null , skip , split 1 after that.

see changes:

while((word=breader.readline()) != null){ string[] words =word.split(" "); string sx = words[0]; string sy = words[1]; // --- line exception system.out.println(sx); system.out.println(sy); }

java android

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -