Check not necessary as long as first if(byteBuffer==null) is outside of the try..finally