get Unsigned Short From ByteBuffer - Java java.nio

Java examples for java.nio:ByteBuffer Short

Description

get Unsigned Short From ByteBuffer

Demo Code


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

public class Main {
    public static int getUnsignedShortFrom(ByteBuffer bb) {
        return (bb.getShort() & 0x0000FFFF);
    }/*from  w ww . ja  va 2  s.co  m*/
}

Related Tutorials