Why not just use the syntax http(s)://LHOST:LPORT?
Then just ```new URI(URI).openConnection()``` on the java side?