Here you can find the source of readUnsignedTriByte(ByteBuffer buffer)
Parameter | Description |
---|---|
buffer | The buffer. |
public static int readUnsignedTriByte(ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { /**//from www. ja va2s . c o m * Reads an unsigned tri byte from the specified buffer. * * @param buffer The buffer. * @return The tri byte. */ public static int readUnsignedTriByte(ByteBuffer buffer) { return (buffer.get() & 0xFF) << 16 | (buffer.get() & 0xFF) << 8 | buffer.get() & 0xFF; } }