public final class TextFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TextFormat.ParseException
Thrown when parsing an invalid text format message.
|
Modifier and Type | Method and Description |
---|---|
static void |
merge(CharSequence input,
ExtensionRegistry extensionRegistry,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
static void |
merge(CharSequence input,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
static void |
merge(Readable input,
ExtensionRegistry extensionRegistry,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
static void |
merge(Readable input,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
static void |
print(Message message,
Appendable output)
Outputs a textual representation of the Protocol Message supplied into
the parameter output.
|
static void |
print(UnknownFieldSet fields,
Appendable output)
Outputs a textual representation of
fields to output . |
static void |
printField(Descriptors.FieldDescriptor field,
Object value,
Appendable output) |
static String |
printFieldToString(Descriptors.FieldDescriptor field,
Object value) |
static String |
printToString(Message message)
Like
print() , but writes directly to a String and
returns it. |
static String |
printToString(UnknownFieldSet fields)
Like
print() , but writes directly to a String and
returns it. |
public static void print(Message message, Appendable output) throws IOException
IOException
public static void print(UnknownFieldSet fields, Appendable output) throws IOException
fields
to output
.IOException
public static String printToString(Message message)
print()
, but writes directly to a String
and
returns it.public static String printToString(UnknownFieldSet fields)
print()
, but writes directly to a String
and
returns it.public static void printField(Descriptors.FieldDescriptor field, Object value, Appendable output) throws IOException
IOException
public static String printFieldToString(Descriptors.FieldDescriptor field, Object value)
public static void merge(Readable input, Message.Builder builder) throws IOException
input
and merge the contents
into builder
.IOException
public static void merge(CharSequence input, Message.Builder builder) throws TextFormat.ParseException
input
and merge the contents
into builder
.TextFormat.ParseException
public static void merge(Readable input, ExtensionRegistry extensionRegistry, Message.Builder builder) throws IOException
input
and merge the contents
into builder
. Extensions will be recognized if they are
registered in extensionRegistry
.IOException
public static void merge(CharSequence input, ExtensionRegistry extensionRegistry, Message.Builder builder) throws TextFormat.ParseException
input
and merge the contents
into builder
. Extensions will be recognized if they are
registered in extensionRegistry
.TextFormat.ParseException
Copyright © 2008-2012. All Rights Reserved.