Java ByteBuffer Write writeLTriad(int triad, ByteBuffer bb)

Here you can find the source of writeLTriad(int triad, ByteBuffer bb)

Description

write L Triad

License

Open Source License

Declaration

public static void writeLTriad(int triad, ByteBuffer bb) 

Method Source Code


//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) };
    }
}

Related

  1. writeLength(ByteBuffer buffer, long l)
  2. writeLong(ByteBuffer buf, long value, int len)
  3. writeLong(ByteBuffer logBuf, long l)
  4. writeLong(long num, ByteBuffer out)
  5. writeLong(long v, ByteBuffer buffer)
  6. writeNullTerminatedString(ByteBuffer buf, String s, String encoding)
  7. writePackageName(ByteBuffer buffer, String packageName)
  8. writeRemaining(WritableByteChannel channel, ByteBuffer buffer)
  9. writeResBit15(int value, ByteBuffer toBuffer)