Here you can find the source of writeBytesToSocket(InputStream requestData, DataOutputStream writeClient)
public static void writeBytesToSocket(InputStream requestData, DataOutputStream writeClient) throws IOException
//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); } } }