| Modifier and Type | Method and Description |
|---|---|
| public XMessage | |
| public List | findInitializationErrors()
Implements com. Returns a list of field paths (e.g. "foo.bar.baz") of required fields which are not set in this message. |
| public Map | getAllFields()
Implements com. Returns a collection of all the fields in this message which are set and their corresponding values. |
| public byte[] | getByteBuffer()
Implements com. Returns the array of bytes this Buffer is using to read from. |
| public Message | getDefaultInstanceForType()
Implements com. Get an instance of the type with no fields set. |
| public Descriptors. | getDescriptorForType()
Implements com. Get the message's type's descriptor. |
| public Object | getField(Descriptors.
Implements com. Obtains the value of the given field, or the default value if it is not set. |
| public String | getInitializationErrorString()
Implements com. Returns a comma-delimited list of required fields which are not set in this message object. |
| public Message | |
| public List | |
| public Descriptors. | getOneofFieldDescriptor(Descriptors.
Implements com. Obtains the FieldDescriptor if the given oneof is set. |
| public Parser | getParserForType()
Implements com. Gets the parser for a message of the same type as this message. |
| public int | getPosition()
Implements com. Returns the current position to write to/ read from |
| public Object | getRepeatedField(Descriptors.
Implements com. Gets an element of a repeated field. |
| public int | getRepeatedFieldCount(Descriptors.
Implements com. Gets the number of elements of a repeated field. |
| public int | getSerializedSize()
Implements com. Get the number of bytes required to encode this message. |
| public UnknownFieldSet | getUnknownFields()
Implements com. Get the |
| public boolean | hasField(Descriptors.
Implements com. Returns true if the given field is set. |
| public boolean | hasOneof(Descriptors.
Implements com. Returns true if the given oneof is set. |
| public boolean | isInitialized()
Implements com. Returns true if all required fields in the message and all embedded messages are set, false otherwise. |
| public Message. | newBuilderForType()
Implements com. Constructs a new builder for a message of the same type as this message. |
| public Message. | toBuilder()
Implements com. Constructs a builder initialized with the current message. |
| public byte[] | toByteArray()
Implements com. Serializes the message to a |
| public ByteString | toByteString()
Implements com. Serializes the message to a |
| public void | writeDelimitedTo(OutputStream arg0)
Implements com. Like |
| public void | writeTo(CodedOutputStream arg0)
Implements com. Serializes the message and writes it to |
| public void | writeTo(OutputStream arg0)
Implements com. Serializes the message and writes it to |
| message | back to summary |
|---|---|
| private Message message | |
| notices | back to summary |
|---|---|
| private List<Notice> notices | |
| XMessage | back to summary |
|---|---|
| public XMessage(Message mess) | |
| addNotices | back to summary |
|---|---|
| public XMessage addNotices(List<Notice> n) | |
| findInitializationErrors | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a list of field paths (e.g. "foo.bar.baz") of required fields which are not set in this
message. You should call
| |
| getAllFields | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns a collection of all the fields in this message which are set and their corresponding
values. A singular ("required" or "optional") field is set iff hasField() returns true for that
field. A "repeated" field is set iff getRepeatedFieldCount() is greater than zero. The values
are exactly what would be returned by calling
| |
| getByteBuffer | back to summary |
|---|---|
| public byte[] getByteBuffer() Implements com. Doc from com. Returns the array of bytes this Buffer is using to read from.
| |
| getDefaultInstanceForType | back to summary |
|---|---|
| public Message getDefaultInstanceForType() Implements com. Doc from com. Get an instance of the type with no fields set. Because no fields are set, all getters for
singular fields will return default values and repeated fields will appear empty. This may or
may not be a singleton. This differs from the
| |
| getDescriptorForType | back to summary |
|---|---|
| public Descriptors. Implements com. Doc from com. Get the message's type's descriptor. This differs from the
| |
| getField | back to summary |
|---|---|
| public Object getField(Descriptors. Implements com. Doc from com. Obtains the value of the given field, or the default value if it is not set. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned. For repeated fields, a java.util.List is returned.
| |
| getInitializationErrorString | back to summary |
|---|---|
| public String getInitializationErrorString() Implements com. Doc from com. Returns a comma-delimited list of required fields which are not set in this message object. You
should call
| |
| getMessage | back to summary |
|---|---|
| public Message getMessage() | |
| getNotices | back to summary |
|---|---|
| public List | |
| getOneofFieldDescriptor | back to summary |
|---|---|
| public Descriptors. Implements com. Doc from com. Obtains the FieldDescriptor if the given oneof is set. Returns null if no field is set.
| |
| getParserForType | back to summary |
|---|---|
| public Parser Implements com. Doc from com. Gets the parser for a message of the same type as this message.
| |
| getPosition | back to summary |
|---|---|
| public int getPosition() Implements com. Doc from com. Returns the current position to write to/ read from
| |
| getRepeatedField | back to summary |
|---|---|
| public Object getRepeatedField(Descriptors. Implements com. Doc from com. Gets an element of a repeated field. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned.
| |
| getRepeatedFieldCount | back to summary |
|---|---|
| public int getRepeatedFieldCount(Descriptors. Implements com. Doc from com. Gets the number of elements of a repeated field. This is exactly equivalent to calling the generated "Count" accessor method corresponding to the field.
| |
| getSerializedSize | back to summary |
|---|---|
| public int getSerializedSize() Implements com. Doc from com. Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that. If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will be smaller than the actual number of bytes required and might be negative.
| |
| getUnknownFields | back to summary |
|---|---|
| public UnknownFieldSet getUnknownFields() Implements com. Doc from com. Get the
| |
| hasField | back to summary |
|---|---|
| public boolean hasField(Descriptors. Implements com. Doc from com. Returns true if the given field is set. This is exactly equivalent to calling the generated "has" accessor method corresponding to the field. The return value of hasField() is semantically meaningful only for fields where field.hasPresence() == true.
| |
| hasOneof | back to summary |
|---|---|
| public boolean hasOneof(Descriptors. Implements com. Doc from com. Returns true if the given oneof is set.
| |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() Implements com. Doc from com. Returns true if all required fields in the message and all embedded messages are set, false otherwise. See also:
| |
| newBuilderForType | back to summary |
|---|---|
| public Message. Implements com. Doc from com. Constructs a new builder for a message of the same type as this message.
| |
| toBuilder | back to summary |
|---|---|
| public Message. Implements com. Doc from com. Constructs a builder initialized with the current message. Use this to derive a new message from the current one.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Implements com. Doc from com. Serializes the message to a
| |
| toByteString | back to summary |
|---|---|
| public ByteString toByteString() Implements com. Doc from com. Serializes the message to a
| |
| writeDelimitedTo | back to summary |
|---|---|
| public void writeDelimitedTo(OutputStream arg0) throws IOException Implements com. Doc from com. Like
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(CodedOutputStream arg0) throws IOException Implements com. Doc from com. Serializes the message and writes it to
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(OutputStream arg0) throws IOException Implements com. Doc from com. Serializes the message and writes it to Note Protocol Buffers are not self-delimiting. Therefore, if you write any more data to the
stream after the message, you must somehow ensure that the parser on the receiving end does not
interpret this as being part of the protocol message. This can be done, for instance, by
writing the size of the message before the data, then making sure to limit the input to that
size on the receiving end by wrapping the InputStream in one which limits the input.
Alternatively, just use
| |