On Fri, Mar 16, 2012 at 8:18 PM, TreKing <treking...@gmail.com> wrote:

> You posted the exception itself. You did NOT post the exception's MESSAGE.
> I said before, if you call getMessage() on the exception object, it gives
> you a REASON WHY the generic IOException was raised.
>

OK, I got what you mean.

Well, I tried this to show the exception's MESSAGE --

*catch (IOException e) {
            String err = (e.getMessage()==null)?"No message
here":e.getMessage();
            Log.e("IOException:",err);

            throw new RuntimeException(e);
        }*



>
> So, again ... what is the exception's MESSAGE?
>
>



so, here is the MESSAGE as follows:

1) *In case of using Byte Array, my message is:*

     *No message here*

 The above message indicates that *getMessage() returns NULL* here.

Now, when I used e.printStackTrace() instead of e.getMessage, I got
following result.

03-17 12:43:28.631: WARN/System.err(480): java.io.IOException
03-17 12:43:28.771: WARN/System.err(480):     at
android.content.res.AssetManager.readAsset(Native Method)
03-17 12:43:28.782: WARN/System.err(480):     at
android.content.res.AssetManager.access$700(AssetManager.java:36)
03-17 12:43:28.820: WARN/System.err(480):     at
android.content.res.AssetManager$AssetInputStream.read(AssetManager.java:571)
03-17 12:43:28.850: WARN/System.err(480):     at
com.universal.dictionary.onCreate(dictionary.java:30)
03-17 12:43:28.870: WARN/System.err(480):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-17 12:43:28.870: WARN/System.err(480):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-17 12:43:28.892: WARN/System.err(480):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-17 12:43:28.892: WARN/System.err(480):     at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-17 12:43:28.920: WARN/System.err(480):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-17 12:43:28.920: WARN/System.err(480):     at
android.os.Handler.dispatchMessage(Handler.java:99)
03-17 12:43:28.939: WARN/System.err(480):     at
android.os.Looper.loop(Looper.java:123)
03-17 12:43:28.939: WARN/System.err(480):     at
android.app.ActivityThread.main(ActivityThread.java:4627)
03-17 12:43:28.951: WARN/System.err(480):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-17 12:43:28.961: WARN/System.err(480):     at
java.lang.reflect.Method.invoke(Method.java:521)
03-17 12:43:28.961: WARN/System.err(480):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-17 12:43:28.971: WARN/System.err(480):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-17 12:43:28.991: WARN/System.err(480):     at
dalvik.system.NativeStart.main(Native Method)
*

2) In case of using BufferedInputStream, here is my message:*

    The output is same even in this case.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to