Top Description Inners Constructors Methods
com.google.protobuf

pack-priv final Class TextFormatEscaper

extends Object
Class Inheritance

Provide text format escaping support for proto2 instances.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
escapeBytes(final 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.

pack-priv static String
escapeBytes(final 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.

pack-priv static String
escapeBytes(final byte[] input)

Like escapeBytes(ByteString), but used for byte array.

pack-priv static String
escapeDoubleQuotesAndBackslashes(final String input)

Escape double quotes and backslashes in a String for unicode output of a message.

pack-priv static String
escapeText(final String input)

Like escapeBytes(ByteString), but escapes a text string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TextFormatEscaperback to summary
private TextFormatEscaper()

Method Detail

escapeBytesback to summary
pack-priv static String escapeBytes(final 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. All bytes that are not printable 7-bit ASCII characters are escaped, as well as backslash, single-quote, and double-quote characters. Characters for which no defined short-hand escape sequence is defined will be escaped using 3-digit octal sequences.

escapeBytesback to summary
pack-priv static String escapeBytes(final 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. All bytes that are not printable 7-bit ASCII characters are escaped, as well as backslash, single-quote, and double-quote characters. Characters for which no defined short-hand escape sequence is defined will be escaped using 3-digit octal sequences.

escapeBytesback to summary
pack-priv static String escapeBytes(final byte[] input)

Like escapeBytes(ByteString), but used for byte array.

escapeDoubleQuotesAndBackslashesback to summary
pack-priv static String escapeDoubleQuotesAndBackslashes(final String input)

Escape double quotes and backslashes in a String for unicode output of a message.

escapeTextback to summary
pack-priv static String escapeText(final String input)

Like 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.

com.google.protobuf back to summary

private Interface TextFormatEscaper.ByteSequence


Method Summary

Modifier and TypeMethod and Description
public byte
byteAt(int offset)

public int
size()

Method Detail

byteAtback to summary
public byte byteAt(int offset)
sizeback to summary
public int size()