check if all bytes are send in java workers