Java ByteBuffer to Int Array getInt(ByteBuffer byteBuffer)

Here you can find the source of getInt(ByteBuffer byteBuffer)

Description

get Int

License

Apache License

Declaration

public static long getInt(ByteBuffer byteBuffer) 

Method Source Code


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

import java.nio.ByteBuffer;

public class Main {
    private static final int INT_PADDING = 0xFFFFFFFF;

    public static long getInt(ByteBuffer byteBuffer) {
        return ((long) byteBuffer.getInt() & INT_PADDING);
    }/*from   ww  w .  ja v  a  2 s  .c om*/

    public static long getInt(ByteBuffer byteBuffer, int position) {
        return ((long) byteBuffer.getInt(position) & INT_PADDING);
    }
}

Related

  1. deserializeIntArray(ByteBuffer buffer)
  2. getInt(ByteBuffer b, int n)
  3. getInt(ByteBuffer bb)
  4. getInt(ByteBuffer bb, int bi)
  5. getInt(ByteBuffer buffer, ByteOrder order)
  6. getInt(ByteBuffer intCalculator, byte[] bytes)
  7. getInt8(ByteBuffer input)
  8. getIntArray(ByteBuffer buffer, int size)
  9. getIntArray(ByteBuffer data, int offset, int length)