Java DataOutput Write Byte Array writeBytesToSocket(InputStream requestData, DataOutputStream writeClient)

Here you can find the source of writeBytesToSocket(InputStream requestData, DataOutputStream writeClient)

Description

write Bytes To Socket

License

Open Source License

Declaration

public static void writeBytesToSocket(InputStream requestData, DataOutputStream writeClient)
            throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static void writeBytesToSocket(InputStream requestData, DataOutputStream writeClient)
            throws IOException {
        System.out.println("writeBytesToSocket");
        byte b;/*w ww. j  av a2  s. c o m*/
        while ((b = (byte) requestData.read()) != -1) {
            writeClient.write(b);
        }
    }
}

Related

  1. writeBytes(byte[] data, DataOutput out)
  2. writeBytes(DataOutput dataOutput, byte[] bytes)
  3. writeBytes(DataOutputStream out, byte[] data)
  4. writeBytesWithLength(DataOutput out, byte[] bytes)