Download file from HTTP & HTTPS server using Java