Here you can find the source of getTriByte(ByteBuffer buf)
Parameter | Description |
---|---|
buf | The buffer. |
public static int getTriByte(ByteBuffer buf)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { /**//from w ww .j av a 2 s . c o m * Reads a 'tri-byte' from the specified buffer. * @param buf The buffer. * @return The value. */ public static int getTriByte(ByteBuffer buf) { return ((buf.get() & 0xFF) << 16) | ((buf.get() & 0xFF) << 8) | (buf.get() & 0xFF); } }