Fixed nullptr exception in java binary reader