Java Socket Write writeFromServer(Socket sck, String row)

Here you can find the source of writeFromServer(Socket sck, String row)

Description

write From Server

License

Open Source License

Declaration

public static void writeFromServer(Socket sck, String row)
            throws IOException 

Method Source Code

//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();
    }
}

Related

  1. getOutputStreamFromSocket(final Socket socket)
  2. getWriter(Socket socket)
  3. openWriter(Socket socket)
  4. writeData(Socket id, byte[] data, int len)
  5. writeDatasIntoSocket(Socket socket, String datas)
  6. writeOutputStream(Socket socket, StringBuffer sb)
  7. writeUTF(final Socket socket, final String out)