Java Socket Write writeDatasIntoSocket(Socket socket, String datas)

Here you can find the source of writeDatasIntoSocket(Socket socket, String datas)

Description

write Datas Into Socket

License

Apache License

Declaration

public static void writeDatasIntoSocket(Socket socket, String datas) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.DataOutputStream;

import java.io.IOException;
import java.net.Socket;

public class Main {
    public static void writeDatasIntoSocket(Socket socket, String datas) throws IOException {
        DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
        dos.writeBytes(datas);/*from w w w. ja  v a  2s .  c o m*/
        dos.flush();
    }
}

Related

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