@InterfaceAudience.Private public class ProtobufMagic extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static byte[] | PB_MAGICMagic we put ahead of a serialized protobuf message. | 
| Modifier and Type | Method and Description | 
|---|---|
| static boolean | isPBMagicPrefix(byte[] bytes)Returns True if passed  byteshasPB_MAGICfor a prefix. | 
| static boolean | isPBMagicPrefix(byte[] bytes,
               int offset,
               int len)Returns True if passed  byteshasPB_MAGICfor 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_MAGICCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.