Here you can find the source of putTriByte(ByteBuffer buf, int value)
Parameter | Description |
---|---|
buf | The buffer. |
value | The value. |
public static void putTriByte(ByteBuffer buf, int value)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { /**//from w ww.j a v a2 s . c om * Writes a 'tri-byte' to the specified buffer. * @param buf The buffer. * @param value The value. */ public static void putTriByte(ByteBuffer buf, int value) { buf.put((byte) (value >> 16)); buf.put((byte) (value >> 8)); buf.put((byte) value); } }