Here you can find the source of intToBytesBigend(int value)
public static byte[] intToBytesBigend(int value)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] intToBytesBigend(int value) { byte[] src = new byte[4]; src[0] = (byte) ((value >> 24) & 0xFF); src[1] = (byte) ((value >> 16) & 0xFF); src[2] = (byte) ((value >> 8) & 0xFF); src[3] = (byte) (value & 0xFF); return src; }//from w ww . java2s . com }