Java ByteBuffer Get getBoolean(ByteBuffer b)

Here you can find the source of getBoolean(ByteBuffer b)

Description

get Boolean

License

Apache License

Declaration

public static boolean getBoolean(ByteBuffer b) 

Method Source Code


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

import java.nio.ByteBuffer;

public class Main {
    public static boolean getBoolean(ByteBuffer b) {
        return (b.getInt() == 1);
    }/* ww w .ja  v a  2 s . c om*/

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

Related

  1. getAttrs(Map fields)
  2. getBatch(ByteBuffer bb)
  3. getBigDecimalFromByteBuffer( ByteBuffer bytebuf, int start, int length, int scale)
  4. getBit(ByteBuffer in, int pos)
  5. getBitString(java.nio.ByteBuffer buffer, int lenBits)
  6. getBoolean(ByteBuffer bb)
  7. getBoolean(ByteBuffer bytes)
  8. getBoolean(java.nio.ByteBuffer buffer)
  9. getBuffer(ByteBuffer buffer, int len)