import java.nio.ByteBuffer;
import java.nio.ByteOrder;
int value;
ByteBuffer temp = ByteBuffer.wrap(new byte[4]);
temp.putInt(0, value).order( ByteOrder.BIG_ENDIAN );
var = ((p[n+1]&0xff) << 8) | (p[n]&0xff);
byte[] temp = new byte[24];
//ISI + zero
temp[0] = 0x49;
temp[1] = 0x53;
temp[2] = 0x49;
temp[3] = 0x00;
//Port
temp[4] = 0x00;
temp[5] = 0x00;
//Flags
temp[6] = (byte)41;
//Nodesecs
temp[7] = 0x01;
//Password
temp[8] = 0x00;
temp[9] = 0x00;
temp[10] = 0x00;
temp[11] = 0x00;
temp[12] = 0x00;
temp[13] = 0x00;
temp[14] = 0x00;
temp[15] = 0x00;
temp[16] = 0x00;
temp[17] = 0x00;
temp[18] = 0x00;
temp[19] = 0x00;
temp[20] = 0x00;
temp[21] = 0x00;
temp[22] = 0x00;
temp[23] = 0x00;