Java ByteBuffer to Int getUnsignedShort(ByteBuffer bb)

Here you can find the source of getUnsignedShort(ByteBuffer bb)

Description

get Unsigned Short

License

LGPL

Declaration

public static int getUnsignedShort(ByteBuffer bb) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.nio.ByteBuffer;

public class Main {
    public static int getUnsignedShort(ByteBuffer bb) {
        return (bb.getShort() & 0xffff);
    }/*from   www  .  j a  va  2 s.c om*/

    public static int getUnsignedShort(ByteBuffer bb, int position) {
        return (bb.getShort(position) & 0xffff);
    }
}

Related

  1. getUnsignedInt16LSBMSB(ByteBuffer byteBuffer)
  2. getUnsignedLong(ByteBuffer buf)
  3. getUnsignedLong(final ByteBuffer src)
  4. getUnsignedShort(ByteBuffer bb)
  5. getUnsignedShort(ByteBuffer bb)
  6. getUnsignedShort(ByteBuffer buf)
  7. getUnsignedShort(ByteBuffer buffer)
  8. getUnsignedShort(ByteBuffer buffer, int offset)
  9. getUnsignedShort(ByteBuffer bytes)