Code example for NetworkErrorException

0
					new InputStreamReader(content));
			Log.i(TAG, "Reader created for URL: " + BASE_URI + path);
			return reader;
		} 
		else { 
			throw new NetworkErrorException();
		} 
	} 
	 
	public static HttpResponse doPost(JSONObject object, String path) {
		HttpClient client = new DefaultHttpClient();
		HttpPost post = new HttpPost(BASE_URI + path);
		try { 
			post.setEntity(new StringEntity(object.toString()));
			post.setHeader("Content-Type", "application/json");
			Log.i(TAG, "Do post: " + object.toString());
			HttpResponse response = client.execute(post);
			return response;
		} catch (Exception e) {
			Log.e(TAG, "could not perform post", e);
		}