is ByteBuffer Empty - Java java.nio

Java examples for java.nio:ByteBuffer

Description

is ByteBuffer Empty

Demo Code


//package com.java2s;

import java.nio.ByteBuffer;

public class Main {
    public static boolean isEmpty(ByteBuffer bb) {
        return bb == null || bb.capacity() == 0;
    }//from  w w w  .j ava 2 s .  c om
}

Related Tutorials