Here you can find the source of readLTriad(byte[] triad)
public static int readLTriad(byte[] triad)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static int readLTriad(ByteBuffer bb) { byte[] triad = new byte[3]; bb.get(triad);//from www . j a va 2 s .c o m return readLTriad(triad); } public static int readLTriad(byte[] triad) { return triad[0] + (triad[1] << 8) + (triad[2] << 16); } }