Public Member Functions | |
Printer | escapingNonAscii (boolean escapeNonAscii) |
void | print (final MessageOrBuilder message, final Appendable output) throws IOException |
void | print (final UnknownFieldSet fields, final Appendable output) throws IOException |
void | printField (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
String | printFieldToString (final FieldDescriptor field, final Object value) |
void | printFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
String | printToString (final MessageOrBuilder message) |
String | printToString (final UnknownFieldSet fields) |
String | shortDebugString (final FieldDescriptor field, final Object value) |
String | shortDebugString (final MessageOrBuilder message) |
String | shortDebugString (final UnknownFieldSet fields) |
Private Member Functions | |
void | print (final MessageOrBuilder message, final TextGenerator generator) throws IOException |
Printer (boolean escapeNonAscii) | |
void | printField (final FieldDescriptor field, final Object value, final TextGenerator generator) throws IOException |
void | printFieldValue (final FieldDescriptor field, final Object value, final TextGenerator generator) throws IOException |
void | printMessage (final MessageOrBuilder message, final TextGenerator generator) throws IOException |
void | printSingleField (final FieldDescriptor field, final Object value, final TextGenerator generator) throws IOException |
Static Private Member Functions | |
static void | printUnknownField (final int number, final int wireType, final List<?> values, final TextGenerator generator) throws IOException |
static void | printUnknownFields (final UnknownFieldSet unknownFields, final TextGenerator generator) throws IOException |
static void | printUnknownFieldValue (final int tag, final Object value, final TextGenerator generator) throws IOException |
Private Attributes | |
final boolean | escapeNonAscii |
Static Private Attributes | |
static final Printer | DEFAULT = new Printer(true) |
Helper class for converting protobufs to text.
Definition at line 285 of file TextFormat.java.
|
inlineprivate |
Definition at line 293 of file TextFormat.java.
|
inline |
Return a new Printer instance with the specified escape mode.
escapeNonAscii | If true, the new Printer will escape non-ASCII characters (this is the default behavior. If false, the new Printer will print non-ASCII characters as is. In either case, the new Printer still escapes newlines and quotes in strings. |
Definition at line 306 of file TextFormat.java.
|
inline |
Outputs a textual representation of the Protocol Message supplied into the parameter output. (This representation is the new version of the classic "ProtocolPrinter" output from the original Protocol Buffer system)
Definition at line 315 of file TextFormat.java.
|
inlineprivate |
Definition at line 324 of file TextFormat.java.
|
inline |
|
inline |
Definition at line 339 of file TextFormat.java.
|
inlineprivate |
Definition at line 344 of file TextFormat.java.
|
inline |
Definition at line 329 of file TextFormat.java.
|
inline |
Outputs a textual representation of the value of given field value.
field | the descriptor of the field |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 366 of file TextFormat.java.
|
inlineprivate |
Definition at line 372 of file TextFormat.java.
|
inlineprivate |
Definition at line 540 of file TextFormat.java.
|
inlineprivate |
Definition at line 548 of file TextFormat.java.
|
inline |
Like
, but writes directly to a
and returns it.
Definition at line 441 of file TextFormat.java.
|
inline |
Like
, but writes directly to a
and returns it.
Definition at line 451 of file TextFormat.java.
|
inlinestaticprivate |
Definition at line 616 of file TextFormat.java.
|
inlinestaticprivate |
Definition at line 590 of file TextFormat.java.
|
inlinestaticprivate |
Definition at line 503 of file TextFormat.java.
|
inline |
Generates a human readable form of the field, useful for debugging and other purposes, with no newline characters.
Definition at line 479 of file TextFormat.java.
|
inline |
Generates a human readable form of this message, useful for debugging and other purposes, with no newline characters.
Definition at line 465 of file TextFormat.java.
|
inline |
Generates a human readable form of the unknown fields, useful for debugging and other purposes, with no newline characters.
Definition at line 493 of file TextFormat.java.
Definition at line 288 of file TextFormat.java.
|
private |
Whether to escape non ASCII characters with backslash and octal.
Definition at line 291 of file TextFormat.java.