C#:Array.Copy(a, 0, b, 0, 4);
java: System.arraycopy(a, 0, b, 0, 4);
c#: Sockedt.Send(byte[] buffer, int size, SocketFlags socketFlags);
java:public void Send(byte[] prebuffer, int size) throws Exception
{
try
{
byte[] sendBuffer = new byte[size];
for(int i=0;i<size;i++){
sendBuffer[i]=prebuffer[i];
}
output.write(sendBuffer);
output.flush();
}
catch (Exception e)
{
e.printStackTrace();
if (output != null)
output.close();
throw e;
}
}