URL class. I remember there are openConncetion and openstream methods.