final class TextFormatEscaper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static interface |
TextFormatEscaper.ByteSequence |
Modifier | Constructor and Description |
---|---|
private |
TextFormatEscaper() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.String |
escapeBytes(byte[] input)
Like
escapeBytes(ByteString) , but used for byte array. |
(package private) static java.lang.String |
escapeBytes(ByteString input)
Escapes bytes in the format used in protocol buffer text format, which
is the same as the format used for C string literals.
|
(package private) static java.lang.String |
escapeBytes(TextFormatEscaper.ByteSequence input)
Escapes bytes in the format used in protocol buffer text format, which
is the same as the format used for C string literals.
|
(package private) static java.lang.String |
escapeDoubleQuotesAndBackslashes(java.lang.String input)
Escape double quotes and backslashes in a String for unicode output of a message.
|
(package private) static java.lang.String |
escapeText(java.lang.String input)
Like
escapeBytes(ByteString) , but escapes a text string. |
static java.lang.String escapeBytes(TextFormatEscaper.ByteSequence input)
static java.lang.String escapeBytes(ByteString input)
static java.lang.String escapeBytes(byte[] input)
escapeBytes(ByteString)
, but used for byte array.static java.lang.String escapeText(java.lang.String input)
escapeBytes(ByteString)
, but escapes a text string.
Non-ASCII characters are first encoded as UTF-8, then each byte is escaped
individually as a 3-digit octal escape. Yes, it's weird.static java.lang.String escapeDoubleQuotesAndBackslashes(java.lang.String input)