Java tutorial
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { public static byte[] my_int_to_bb_le(int myInteger) { return ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putInt(myInteger).array(); } }