import java.io.OutputStreamWriter; import java.net.Socket; public class TestOut { public static void main(String[] args) { try { OutputStreamWriter osw = new OutputStreamWriter(new Socket("127.0.0.1", 16789).getOutputStream()); osw.write(65533); osw.flush(); } catch (Exception e) { e.printStackTrace(); } } }