@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() |
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–2019 Cloudera. All rights reserved.