Did you pull in a library to do the HTTP work or just use the raw HttpURLConnection?
I agree checked exceptions are annoying, though I have kind of grown to like them since they force me to think about failure cases.
You're going to hate this answer, but honestly, after you do Java for awhile the lines of code just become noise you don't notice... it's like reading and writing XML by hand; kinda sucks, but eventually you just stop noticing.
I used this in the end: http://loopj.com/android-async-http/, it exposes an interface that does not make me shudder, and I am guessing that is a very good thing.
I should read about checked exceptions more, I don't currently understand the difference between checked and unchecked.
I don't hate that answer, I was just hoping it wouldn't come to that :P Getting used to a language to get one's job done is fine, but it's not something that would cause one to fall in love with said language...
A checked exception is one that the compiler forces you to write a check for. An unchecked exception ("the good kind") is one that you could write a check for if you want to.
You probably want to have at least one exception "catch" block somewhere, such as within a message/event handler loop, but checked exceptions force you to write the error catch at the place where a routine is called, and MANY such checks for other calls, rather than at one place at the top of an operation.
While this might make sense in a GUI/AWT/Swing app, it does not make sense in a batch processing app (or web app). In that case, there is no user to get a dialog box, you simply log "it did not work due to ..." and move on. Checked exceptions make you write a bunch of extra code.
Alas, as much as I like golang, this is one area that it seems to have got worse than Java: error codes instead of exceptions, preferably unchecked exceptions like C# uses (and other languages, I presume)
I agree checked exceptions are annoying, though I have kind of grown to like them since they force me to think about failure cases.
You're going to hate this answer, but honestly, after you do Java for awhile the lines of code just become noise you don't notice... it's like reading and writing XML by hand; kinda sucks, but eventually you just stop noticing.