Java ByteBuffer Write writeUB2(ByteBuffer buffer, int i)

Here you can find the source of writeUB2(ByteBuffer buffer, int i)

Description

write UB

License

Open Source License

Declaration

public static final void writeUB2(ByteBuffer buffer, int i) 

Method Source Code


//package com.java2s;
import java.nio.ByteBuffer;

public class Main {
    public static final void writeUB2(ByteBuffer buffer, int i) {
        buffer.put((byte) (i & 0xff));
        buffer.put((byte) (i >>> 8));
    }// ww  w.  j  a  v a  2 s  .  c  om
}

Related

  1. writeToChannel(WritableByteChannel chan, ByteBuffer buffer)
  2. writeToChannel(WritableByteChannel dst, ByteBuffer src)
  3. writeToFile(String name, ByteBuffer bb)
  4. writeTs(ByteBuffer is, long ts)
  5. writetUnsignedInt(ByteBuffer buffer, long value)
  6. writeUnsigned(int num, int size, ByteBuffer out)
  7. writeUnsignedInt(ByteBuffer buf, long value)
  8. writeUnsignedInt(final ByteBuffer buffer, final long value)
  9. writeUnsignedVarInt(int value, ByteBuffer dest)