Android ByteBuffer Put putUnsignedShort(final ByteBuffer pByteBuffer, final int pValue)

Here you can find the source of putUnsignedShort(final ByteBuffer pByteBuffer, final int pValue)

Description

put Unsigned Short

Declaration

public static void putUnsignedShort(final ByteBuffer pByteBuffer,
            final int pValue) 

Method Source Code

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

public class Main {
    public static void putUnsignedShort(final ByteBuffer pByteBuffer,
            final int pValue) {
        pByteBuffer.putShort((short) (pValue & 0xFFFF));
    }/*from  w w  w .j  a va 2s  .  co m*/

    public static void putUnsignedShort(final ByteBuffer pByteBuffer,
            final int pPosition, final int pValue) {
        pByteBuffer.putShort(pPosition, (short) (pValue & 0xFFFF));
    }
}

Related

  1. getUnsignedShort(final ByteBuffer pByteBuffer)
  2. getUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition)
  3. putUnsignedInt(final ByteBuffer pByteBuffer, final int pPosition, final long pValue)
  4. putUnsignedInt(final ByteBuffer pByteBuffer, final long pValue)
  5. putUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition, final int pValue)
  6. findCommonPrefix(ByteBuffer buffer, int offsetLeft, int offsetRight, int limit)