Here you can find the source of writeLTriad(int triad, ByteBuffer bb)
public static void writeLTriad(int triad, ByteBuffer bb)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static void writeLTriad(int triad, ByteBuffer bb) { bb.put(writeLTriad(triad));/*from w w w . j av a2s . co m*/ } public static byte[] writeLTriad(int triad) { return new byte[] { (byte) (triad & 0x0000FF), (byte) ((triad & 0x00FF00) >> 8), (byte) ((triad & 0xFF0000) >> 16) }; } }