The second loop could probably be removed and this could be reduced to:
if((var.getRGB(j,i) & 0x00FFFFFF) != 0) {
    return false;
}