Here you can find the source of intToByte(byte[] buf, int off, int value)
public static void intToByte(byte[] buf, int off, int value)
//package com.java2s; //License from project: Open Source License public class Main { public static void intToByte(byte[] buf, int off, int value) { buf[0 + off] = (byte) ((value >>> 24) & 0xFF); buf[1 + off] = (byte) ((value >>> 16) & 0xFF); buf[2 + off] = (byte) ((value >>> 8) & 0xFF); buf[3 + off] = (byte) ((value >>> 0) & 0xFF); }//ww w.j av a2 s .co m }