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