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

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

Description

get U Int

License

Apache License

Declaration

public static short[] getUInt8(ByteBuffer b, int n) 

Method Source Code


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

import java.nio.ByteBuffer;

public class Main {
    public static short[] getUInt8(ByteBuffer b, int n) {
        short s[] = new short[n];
        for (int k = 0; k < s.length; k++) {
            s[k] = getUInt8(b);/* w  w w. j a  va 2s  .co m*/
        }
        return s;
    }

    public static short getUInt8(ByteBuffer b) {
        return (short) (b.get() & 0xFF);
    }
}

Related

  1. getUInt(java.nio.ByteBuffer buffer)
  2. getUInt16(ByteBuffer b, int n)
  3. getUInt16(ByteBuffer buffer)
  4. getUInt16(ByteBuffer buffer)
  5. getUInt32(ByteBuffer b)
  6. getUInteger(ByteBuffer bb)
  7. readLong(ByteBuffer buf, int length)
  8. readLong(ByteBuffer buffer)
  9. readLong(ByteBuffer buffer)