is Byte Array Empty - Android File Input Output

Android examples for File Input Output:Byte Array

Description

is Byte Array Empty

Demo Code

//package com.java2s;

public class Main {
    public static boolean isByteArrayEmpty(byte[] bytes) {
        for (int i = 0; i < bytes.length; i++) {
            if (bytes[i] != 0x00) {
                return false;
            }/*w ww  .  ja va 2s .  c o m*/
        }

        return true;
    }
}

Related Tutorials