Be' penso che con le Socket ed in particolare con getOutputStream e getInputStream lo si possa fare.