Java ByteBuffer to Int getUnsignedShort(ByteBuffer buffer)

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

Description

get Unsigned Short

License

Open Source License

Declaration

public static int getUnsignedShort(ByteBuffer buffer) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

public class Main {
    public static int getUnsignedShort(ByteBuffer buffer) {
        return buffer.getShort() & 0xFFFF;
    }/* w ww.  j  a va  2  s.  c  o m*/
}

Related

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