@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) |
static boolean |
isPBMagicPrefix(byte[] bytes,
int offset,
int len) |
static int |
lengthOfPBMagic()
Returns Length of
PB_MAGIC |
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_MAGICCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.