Commit 01283faa authored by jieluo@google.com's avatar jieluo@google.com

add printUnicode methods in TextFormat

parent 4de8f551
......@@ -83,6 +83,26 @@ public final class TextFormat {
DEFAULT_PRINTER.printUnknownFields(fields, new TextGenerator(output));
}
/**
* Same as {@code print()}, except that non-ASCII characters are not
* escaped.
*/
public static void printUnicode(
final MessageOrBuilder message, final Appendable output)
throws IOException {
UNICODE_PRINTER.print(message, new TextGenerator(output));
}
/**
* Same as {@code print()}, except that non-ASCII characters are not
* escaped.
*/
public static void printUnicode(final UnknownFieldSet fields,
final Appendable output)
throws IOException {
UNICODE_PRINTER.printUnknownFields(fields, new TextGenerator(output));
}
/**
* Generates a human readable form of this message, useful for debugging and
* other purposes, with no newline characters.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment