public void read(ref float value) { int readLen = sizeof(float); if (!readCheck(readLen)) { return; } byte[] dest = BinaryUtility.toBytes(value); BinaryUtility.memcpy(dest, mBuffer, 0, mIndex, readLen); value = BinaryUtility.bytesToFloat(dest); mIndex += readLen; }