Remove the `throws` clause entirely and see what the compiler complains about. Probably at least JSONException and IOException. Alternatively, remove the `throws` clause and `catch` the errors yourself.