org.json.JSONException: End of input at character 0 of
===

    07-28 12:51:56.882: W/System.err(3702): org.json.JSONException: End of input at character 0 of 
    07-28 12:51:56.882: W/System.err(3702): 	at org.json.JSONTokener.syntaxError(JSONTokener.java:446)
    07-28 12:51:56.882: W/System.err(3702): 	at org.json.JSONTokener.nextValue(JSONTokener.java:93)
    07-28 12:51:56.882: W/System.err(3702): 	at org.json.JSONObject.<init>(JSONObject.java:154)
    07-28 12:51:56.882: W/System.err(3702): 	at org.json.JSONObject.<init>(JSONObject.java:171)
    07-28 12:51:56.882: W/System.err(3702): 	at com.android.epaisa.Info.submitInfo(Info.java:186)
    07-28 12:51:56.882: W/System.err(3702): 	at com.android.epaisa.Info.onClick(Info.java:62)
    07-28 12:51:56.882: W/System.err(3702): 	at android.view.View.performClick(View.java:2485)
    07-28 12:51:56.882: W/System.err(3702): 	at android.view.View$PerformClick.run(View.java:9080)
    07-28 12:51:56.882: W/System.err(3702): 	at android.os.Handler.handleCallback(Handler.java:587)
    07-28 12:51:56.882: W/System.err(3702): 	at android.os.Handler.dispatchMessage(Handler.java:92)
    07-28 12:51:56.882: W/System.err(3702): 	at android.os.Looper.loop(Looper.java:130)
    07-28 12:51:56.882: W/System.err(3702): 	at android.app.ActivityThread.main(ActivityThread.java:3687)
    07-28 12:51:56.882: W/System.err(3702): 	at java.lang.reflect.Method.invokeNative(Native Method)
    07-28 12:51:56.882: W/System.err(3702): 	at java.lang.reflect.Method.invoke(Method.java:507)
    07-28 12:51:56.882: W/System.err(3702): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    07-28 12:51:56.882: W/System.err(3702): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
    07-28 12:51:56.882: W/System.err(3702): 	at dalvik.system.NativeStart.main(Native Method)

The error is taking place when I am trying to access this part of code. 
Here is the code snippet for reference

     StringBuffer b = new StringBuffer();
    				System.out.println("Before second while loop");
    				while ((ch = is.read()) != -1) {
    					b.append((char) ch);
    				}
    				System.out.println(b);
    				System.out.println("String buffer"+b.length());
    				jsonObject = new JSONObject(b.toString()); 

b.length()=0 is what values I am getting on Logcat.

Also, I have error at `http://stackoverflow.com/questions/11699099/java-net-socketexception-connection-reset-by-peer` for the same app. I am not sure if they are interconnected/related to each-other.
Thanks & Regards