Here you can find the source of inLittleEndianOrder(ByteBuffer buf)
public static ByteBuffer inLittleEndianOrder(ByteBuffer buf)
//package com.java2s; /* Partial import of https://github.com/jpountz/lz4-java, Apache 2.0 licensed. */ import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { public static ByteBuffer inLittleEndianOrder(ByteBuffer buf) { if (buf.order().equals(ByteOrder.LITTLE_ENDIAN)) { return buf; } else {/*from w w w . j a v a 2 s. c om*/ return buf.duplicate().order(ByteOrder.LITTLE_ENDIAN); } } }