Java ByteBuffer to Long getUInt16(ByteBuffer b, int n)

Here you can find the source of getUInt16(ByteBuffer b, int n)

Description

get U Int

License

Apache License

Declaration

public static int[] getUInt16(ByteBuffer b, int n) 

Method Source Code


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

import java.nio.ByteBuffer;

public class Main {
    public static int[] getUInt16(ByteBuffer b, int n) {
        int i[] = new int[n];
        for (int k = 0; k < i.length; k++) {
            i[k] = getUInt16(b);// ww w.  j  av  a2  s  . c  om
        }
        return i;
    }

    public static int getUInt16(ByteBuffer b) {
        return (b.getShort() & 0xFFFF);
    }

    public static short[] getShort(ByteBuffer b, int n) {
        short s[] = new short[n];
        for (int k = 0; k < s.length; k++) {
            s[k] = b.getShort();
        }
        return s;
    }
}

Related

  1. getUInt(ByteBuffer buffer)
  2. getUInt(ByteBuffer buffer)
  3. getUInt(java.nio.ByteBuffer buffer)
  4. getUInt16(ByteBuffer buffer)
  5. getUInt16(ByteBuffer buffer)
  6. getUInt32(ByteBuffer b)
  7. getUInt8(ByteBuffer b, int n)