MCPcopy Create free account
hub / github.com/apache/fory / ReadHead

Method ReadHead

csharp/src/Fory/Fory.cs:254–263  ·  view source on GitHub ↗

Reads and validates the frame header. Source reader. Thrown when the peer xlang bitmap does not match this runtime mode.

(ByteReader reader)

Source from the content-addressed store, hash-verified

252 /// <param name="reader">Source reader.</param>
253 /// <exception cref="InvalidDataException">Thrown when the peer xlang bitmap does not match this runtime mode.</exception>
254 [MethodImpl(MethodImplOptions.AggressiveInlining)]
255 internal void ReadHead(ByteReader reader)
256 {
257 byte bitmap = reader.ReadUInt8();
258 if (bitmap == ForyHeaderFlag.IsXlang)
259 {
260 return;
261 }
262 ThrowInvalidRootHeader(bitmap);
263 }
264
265 [MethodImpl(MethodImplOptions.NoInlining)]
266 private static void ThrowUnexpectedTrailingBytes<T>() =>

Calls 1

ReadUInt8Method · 0.80