Here you can find the source of int2Bytes(int n, byte[] dst, int start)
public static void int2Bytes(int n, byte[] dst, int start)
//package com.java2s; //License from project: Open Source License public class Main { public static void int2Bytes(int n, byte[] dst, int start) { dst[start] = (byte) (n & 0xff); dst[start + 1] = (byte) ((n & 0xff00) >> 8); dst[start + 2] = (byte) ((n & 0xff0000) >> 16); dst[start + 3] = (byte) ((n & 0xff000000) >> 24); }/*from w w w.j a v a 2 s . com*/ }