Change socket code to J2ME sockets