Class UnknownFieldSetLite

java.lang.Object
com.google.protobuf.UnknownFieldSetLite

public final class UnknownFieldSetLite extends Object
UnknownFieldSetLite is used to keep track of fields which were seen when parsing a protocol message but whose field numbers or types are unrecognized. This most frequently occurs when new fields are added to a message type and then messages containing those fields are read by old software that was compiled before the new types were added.

For use by generated code only.

  • Method Details

    • getDefaultInstance

      public static UnknownFieldSetLite getDefaultInstance()
      Get an empty UnknownFieldSetLite.

      For use by generated code only.

    • makeImmutable

      public void makeImmutable()
      Marks this object as immutable.

      Future calls to methods that attempt to modify this object will throw.

    • writeTo

      public void writeTo(CodedOutputStream output) throws IOException
      Serializes the set and writes it to output.

      For use by generated code only.

      Throws:
      IOException
    • writeAsMessageSetTo

      public void writeAsMessageSetTo(CodedOutputStream output) throws IOException
      Serializes the set and writes it to output using MessageSet wire format.

      For use by generated code only.

      Throws:
      IOException
    • writeTo

      public void writeTo(com.google.protobuf.Writer writer) throws IOException
      Serializes the set and writes it to writer.
      Throws:
      IOException
    • getSerializedSizeAsMessageSet

      public int getSerializedSizeAsMessageSet()
      Get the number of bytes required to encode this field, including field number, using MessageSet wire format.
    • getSerializedSize

      public int getSerializedSize()
      Get the number of bytes required to encode this set.

      For use by generated code only.

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object