Hmmmmm, the Socket class throws four different possible exceptions with that particular Socket constructor.

Your catches for UnknownHostException and IOException aren't catching it. It can't...