Java ByteBuffer to Int readUnsignedInt(ByteBuffer byteBuf)

Here you can find the source of readUnsignedInt(ByteBuffer byteBuf)

Description

read Unsigned Int

License

Apache License

Declaration

static long readUnsignedInt(ByteBuffer byteBuf) throws Exception 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    static long readUnsignedInt(ByteBuffer byteBuf) throws Exception {
        long val = byteBuf.getInt();
        if (val < 0)
            val &= 0xFFFFFFFFL;
        return val;
    }/*from ww  w. j  a  v  a  2s . c  o  m*/
}

Related

  1. readUnsigned(ByteBuffer in, int size)
  2. readUnsignedByte(ByteBuffer buffer)
  3. readUnsignedInt(ByteBuffer buf)
  4. readUnsignedInt(ByteBuffer buffer)
  5. readUnsignedInt(ByteBuffer buffer, int index)
  6. readUnsignedMedium(ByteBuffer buf)
  7. readUnsignedShort(ByteBuffer bb)
  8. readUnsignedShort(ByteBuffer buffer)
  9. readUnsignedTriByte(ByteBuffer buffer)