@InterfaceAudience.Private public class ProtobufMagic extends Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
PB_MAGIC
Magic we put ahead of a serialized protobuf message.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isPBMagicPrefix(byte[] bytes)
Returns True if passed
bytes has PB_MAGIC for a prefix. |
static boolean |
isPBMagicPrefix(byte[] bytes,
int offset,
int len)
Returns True if passed
bytes has PB_MAGIC for a prefix. |
static int |
lengthOfPBMagic()
Returns Length of
PB_MAGIC |
public static final byte[] PB_MAGIC
public static boolean isPBMagicPrefix(byte[] bytes)
bytes
has PB_MAGIC
for a prefix.public static boolean isPBMagicPrefix(byte[] bytes, int offset, int len)
bytes
has PB_MAGIC
for a prefix.public static int lengthOfPBMagic()
PB_MAGIC
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.