@InterfaceAudience.Private public class ProtobufMagic extends Object
限定符和类型 | 字段和说明 |
---|---|
static byte[] |
PB_MAGIC
Magic we put ahead of a serialized protobuf message.
|
public static final byte[] PB_MAGIC
public static boolean isPBMagicPrefix(byte[] bytes)
bytes
- Bytes to check.bytes
has PB_MAGIC
for a prefix.public static boolean isPBMagicPrefix(byte[] bytes, int offset, int len)
bytes
- Bytes to check.offset
- offset to start atlen
- length to usebytes
has PB_MAGIC
for a prefix.public static int lengthOfPBMagic()
PB_MAGIC
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.