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

Method checkHeaderBitmap

java/fory-core/src/main/java/org/apache/fory/Fory.java:578–590  ·  view source on GitHub ↗
(byte bitmap)

Source from the content-addressed store, hash-verified

576 }
577
578 private boolean checkHeaderBitmap(byte bitmap) {
579 Preconditions.checkArgument(
580 (bitmap & reservedBitmapFlags) == 0,
581 "Serialized payload uses reserved header bitmap flags 0x%s",
582 Integer.toHexString(Byte.toUnsignedInt((byte) (bitmap & reservedBitmapFlags))));
583 boolean payloadCrossLanguage = (bitmap & isCrossLanguageFlag) == isCrossLanguageFlag;
584 Preconditions.checkArgument(
585 payloadCrossLanguage == config.isXlang(),
586 "Serialized payload xlang flag %s does not match this Fory mode %s",
587 payloadCrossLanguage,
588 config.isXlang());
589 return (bitmap & isOutOfBandFlag) == isOutOfBandFlag;
590 }
591
592 @Override
593 public <T> T copy(T obj) {

Callers 2

deserializeMethod · 0.95

Calls 3

checkArgumentMethod · 0.95
isXlangMethod · 0.80
toHexStringMethod · 0.45

Tested by

no test coverage detected