Here you can find the source of writeFromServer(Socket sck, String row)
public static void writeFromServer(Socket sck, String row) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedOutputStream; import java.io.IOException; import java.io.PrintStream; import java.net.Socket; public class Main { public static void writeFromServer(Socket sck, String row) throws IOException { PrintStream out = new PrintStream(new BufferedOutputStream( sck.getOutputStream())); for (int i = 0; i < 100; i++) { out.print(row);//from www. j a v a2s . c o m out.print("\r\n"); } out.flush(); } }