Class WireFormat


  • public final class WireFormat
    extends Object
    Defines numeric constants for wire types. Also helps extracting the wire type and field number out of a tag.
    Author:
    [email protected]
    • Method Detail

      • makeTag

        public static int makeTag​(int fieldNumber,
                                  int wireType)
        Makes a tag value given a field number and wire type.
      • getTagWireType

        public static int getTagWireType​(int tag)
        Given a tag value, determines the wire type (the lower 3 bits).
      • getTagFieldNumber

        public static int getTagFieldNumber​(int tag)
        Given a tag value, determines the field number (the upper 29 bits).