Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.TextFormat Class Reference

Classes

class  InvalidEscapeSequenceException
 
class  ParseException
 
class  Parser
 
class  Printer
 
class  TextGenerator
 
class  Tokenizer
 
class  UnknownFieldParseException
 

Static Public Member Functions

static String escapeBytes (byte[] input)
 
static String escapeBytes (byte[] input)
 
static String escapeBytes (ByteString input)
 
static String escapeBytes (ByteString input)
 
static String escapeDoubleQuotesAndBackslashes (final String input)
 
static String escapeDoubleQuotesAndBackslashes (final String input)
 
static Parser getParser ()
 
static Parser getParser ()
 
static void merge (final CharSequence input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws ParseException
 
static void merge (final CharSequence input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws ParseException
 
static void merge (final CharSequence input, final Message.Builder builder) throws ParseException
 
static void merge (final CharSequence input, final Message.Builder builder) throws ParseException
 
static void merge (final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException
 
static void merge (final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException
 
static void merge (final Readable input, final Message.Builder builder) throws IOException
 
static void merge (final Readable input, final Message.Builder builder) throws IOException
 
static< T extends Message > T parse (final CharSequence input, final Class< T > protoClass) throws ParseException
 
static< T extends Message > T parse (final CharSequence input, final Class< T > protoClass) throws ParseException
 
static< T extends Message > T parse (final CharSequence input, final ExtensionRegistry extensionRegistry, final Class< T > protoClass) throws ParseException
 
static< T extends Message > T parse (final CharSequence input, final ExtensionRegistry extensionRegistry, final Class< T > protoClass) throws ParseException
 
static void print (final MessageOrBuilder message, final Appendable output) throws IOException
 
static void print (final MessageOrBuilder message, final Appendable output) throws IOException
 
static void print (final UnknownFieldSet fields, final Appendable output) throws IOException
 
static void print (final UnknownFieldSet fields, final Appendable output) throws IOException
 
static Printer printer ()
 
static Printer printer ()
 
static void printField (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static void printField (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static String printFieldToString (final FieldDescriptor field, final Object value)
 
static String printFieldToString (final FieldDescriptor field, final Object value)
 
static void printFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static void printFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static String printToString (final MessageOrBuilder message)
 
static String printToString (final MessageOrBuilder message)
 
static String printToString (final UnknownFieldSet fields)
 
static String printToString (final UnknownFieldSet fields)
 
static String printToUnicodeString (final MessageOrBuilder message)
 
static String printToUnicodeString (final MessageOrBuilder message)
 
static String printToUnicodeString (final UnknownFieldSet fields)
 
static String printToUnicodeString (final UnknownFieldSet fields)
 
static void printUnicode (final MessageOrBuilder message, final Appendable output) throws IOException
 
static void printUnicode (final MessageOrBuilder message, final Appendable output) throws IOException
 
static void printUnicode (final UnknownFieldSet fields, final Appendable output) throws IOException
 
static void printUnicode (final UnknownFieldSet fields, final Appendable output) throws IOException
 
static void printUnicodeFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static void printUnicodeFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException
 
static void printUnknownFieldValue (final int tag, final Object value, final Appendable output) throws IOException
 
static void printUnknownFieldValue (final int tag, final Object value, final Appendable output) throws IOException
 
static String shortDebugString (final FieldDescriptor field, final Object value)
 
static String shortDebugString (final FieldDescriptor field, final Object value)
 
static String shortDebugString (final MessageOrBuilder message)
 
static String shortDebugString (final MessageOrBuilder message)
 
static String shortDebugString (final UnknownFieldSet fields)
 
static String shortDebugString (final UnknownFieldSet fields)
 
static ByteString unescapeBytes (final CharSequence charString) throws InvalidEscapeSequenceException
 
static ByteString unescapeBytes (final CharSequence charString) throws InvalidEscapeSequenceException
 
static String unsignedToString (final int value)
 
static String unsignedToString (final int value)
 
static String unsignedToString (final long value)
 
static String unsignedToString (final long value)
 

Private Member Functions

 TextFormat ()
 
 TextFormat ()
 

Static Private Member Functions

static int digitValue (final byte c)
 
static int digitValue (final byte c)
 
static boolean isHex (final byte c)
 
static boolean isHex (final byte c)
 
static boolean isOctal (final byte c)
 
static boolean isOctal (final byte c)
 
static TextGenerator multiLineOutput (Appendable output)
 
static TextGenerator multiLineOutput (Appendable output)
 
static long parseInteger (final String text, final boolean isSigned, final boolean isLong) throws NumberFormatException
 
static long parseInteger (final String text, final boolean isSigned, final boolean isLong) throws NumberFormatException
 
static void printUnknownFieldValue (final int tag, final Object value, final TextGenerator generator) throws IOException
 
static void printUnknownFieldValue (final int tag, final Object value, final TextGenerator generator) throws IOException
 
static TextGenerator singleLineOutput (Appendable output)
 
static TextGenerator singleLineOutput (Appendable output)
 

Static Private Attributes

static final Logger logger = Logger.getLogger(TextFormat.class.getName())
 
static final Parser PARSER = Parser.newBuilder().build()
 

Detailed Description

Provide text parsing and formatting support for proto2 instances. The implementation largely follows google/protobuf/text_format.cc.

Author
wenbo.nosp@m.z@go.nosp@m.ogle..nosp@m.com Wenbo Zhu
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

Definition at line 55 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

Constructor & Destructor Documentation

◆ TextFormat() [1/2]

com.google.protobuf.TextFormat.TextFormat ( )
inlineprivate

◆ TextFormat() [2/2]

com.google.protobuf.TextFormat.TextFormat ( )
inlineprivate

Member Function Documentation

◆ digitValue() [1/2]

static int com.google.protobuf.TextFormat.digitValue ( final byte  c)
inlinestaticprivate

Interpret a character as a digit (in any base up to 36) and return the numeric value. This is like

Character.digit()

but we don't accept non-ASCII digits.

Definition at line 2358 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ digitValue() [2/2]

static int com.google.protobuf.TextFormat.digitValue ( final byte  c)
inlinestaticprivate

Interpret a character as a digit (in any base up to 36) and return the numeric value. This is like

Character.digit()

but we don't accept non-ASCII digits.

Definition at line 2516 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ escapeBytes() [1/4]

static String com.google.protobuf.TextFormat.escapeBytes ( byte[]  input)
inlinestatic

◆ escapeBytes() [2/4]

static String com.google.protobuf.TextFormat.escapeBytes ( byte[]  input)
inlinestatic

◆ escapeBytes() [3/4]

static String com.google.protobuf.TextFormat.escapeBytes ( ByteString  input)
inlinestatic

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.

Definition at line 2196 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ escapeBytes() [4/4]

static String com.google.protobuf.TextFormat.escapeBytes ( ByteString  input)
inlinestatic

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.

Definition at line 2284 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ escapeDoubleQuotesAndBackslashes() [1/2]

static String com.google.protobuf.TextFormat.escapeDoubleQuotesAndBackslashes ( final String  input)
inlinestatic

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

Definition at line 2332 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ escapeDoubleQuotesAndBackslashes() [2/2]

static String com.google.protobuf.TextFormat.escapeDoubleQuotesAndBackslashes ( final String  input)
inlinestatic

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

Definition at line 2490 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ getParser() [1/2]

static Parser com.google.protobuf.TextFormat.getParser ( )
inlinestatic

Return a Parser instance which can parse text-format messages. The returned instance is thread-safe.

Definition at line 1358 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ getParser() [2/2]

static Parser com.google.protobuf.TextFormat.getParser ( )
inlinestatic

Return a Parser instance which can parse text-format messages. The returned instance is thread-safe.

Definition at line 1443 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ isHex() [1/2]

static boolean com.google.protobuf.TextFormat.isHex ( final byte  c)
inlinestaticprivate

◆ isHex() [2/2]

static boolean com.google.protobuf.TextFormat.isHex ( final byte  c)
inlinestaticprivate

Is this a hex digit?

Definition at line 2508 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ isOctal() [1/2]

static boolean com.google.protobuf.TextFormat.isOctal ( final byte  c)
inlinestaticprivate

◆ isOctal() [2/2]

static boolean com.google.protobuf.TextFormat.isOctal ( final byte  c)
inlinestaticprivate

Is this an octal digit?

Definition at line 2503 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [1/8]

static void com.google.protobuf.TextFormat.merge ( final CharSequence  input,
final ExtensionRegistry  extensionRegistry,
final Message.Builder  builder 
) throws ParseException
inlinestatic

Parse a text-format message from

and merge the contents into

. Extensions will be recognized if they are registered in

extensionRegistry

.

Definition at line 1404 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [2/8]

static void com.google.protobuf.TextFormat.merge ( final CharSequence  input,
final ExtensionRegistry  extensionRegistry,
final Message.Builder  builder 
) throws ParseException
inlinestatic

Parse a text-format message from

and merge the contents into

. Extensions will be recognized if they are registered in

extensionRegistry

.

Definition at line 1489 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [3/8]

static void com.google.protobuf.TextFormat.merge ( final CharSequence  input,
final Message.Builder  builder 
) throws ParseException
inlinestatic

Parse a text-format message from

and merge the contents into

.

Definition at line 1368 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [4/8]

static void com.google.protobuf.TextFormat.merge ( final CharSequence  input,
final Message.Builder  builder 
) throws ParseException
inlinestatic

Parse a text-format message from

and merge the contents into

.

Definition at line 1453 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [5/8]

static void com.google.protobuf.TextFormat.merge ( final Readable  input,
final ExtensionRegistry  extensionRegistry,
final Message.Builder  builder 
) throws IOException
inlinestatic

Parse a text-format message from

and merge the contents into

. Extensions will be recognized if they are registered in

extensionRegistry

.

Definition at line 1391 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [6/8]

static void com.google.protobuf.TextFormat.merge ( final Readable  input,
final ExtensionRegistry  extensionRegistry,
final Message.Builder  builder 
) throws IOException
inlinestatic

Parse a text-format message from

and merge the contents into

. Extensions will be recognized if they are registered in

extensionRegistry

.

Definition at line 1476 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [7/8]

static void com.google.protobuf.TextFormat.merge ( final Readable  input,
final Message.Builder  builder 
) throws IOException
inlinestatic

Parse a text-format message from

and merge the contents into

.

Definition at line 1363 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ merge() [8/8]

static void com.google.protobuf.TextFormat.merge ( final Readable  input,
final Message.Builder  builder 
) throws IOException
inlinestatic

Parse a text-format message from

and merge the contents into

.

Definition at line 1448 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ multiLineOutput() [1/2]

static TextGenerator com.google.protobuf.TextFormat.multiLineOutput ( Appendable  output)
inlinestaticprivate

◆ multiLineOutput() [2/2]

static TextGenerator com.google.protobuf.TextFormat.multiLineOutput ( Appendable  output)
inlinestaticprivate

◆ parse() [1/4]

static <T extends Message> T com.google.protobuf.TextFormat.parse ( final CharSequence  input,
final Class< T protoClass 
) throws ParseException
inlinestatic

Parse a text-format message from

.

Returns
the parsed message, guaranteed initialized

Definition at line 1378 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ parse() [2/4]

static <T extends Message> T com.google.protobuf.TextFormat.parse ( final CharSequence  input,
final Class< T protoClass 
) throws ParseException
inlinestatic

Parse a text-format message from

.

Returns
the parsed message, guaranteed initialized

Definition at line 1463 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ parse() [3/4]

static <T extends Message> T com.google.protobuf.TextFormat.parse ( final CharSequence  input,
final ExtensionRegistry  extensionRegistry,
final Class< T protoClass 
) throws ParseException
inlinestatic

Parse a text-format message from

. Extensions will be recognized if they are registered in

extensionRegistry

.

Returns
the parsed message, guaranteed initialized

Definition at line 1418 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ parse() [4/4]

static <T extends Message> T com.google.protobuf.TextFormat.parse ( final CharSequence  input,
final ExtensionRegistry  extensionRegistry,
final Class< T protoClass 
) throws ParseException
inlinestatic

Parse a text-format message from

. Extensions will be recognized if they are registered in

extensionRegistry

.

Returns
the parsed message, guaranteed initialized

Definition at line 1503 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ parseInteger() [1/2]

static long com.google.protobuf.TextFormat.parseInteger ( final String  text,
final boolean  isSigned,
final boolean  isLong 
) throws NumberFormatException
inlinestaticprivate

◆ parseInteger() [2/2]

static long com.google.protobuf.TextFormat.parseInteger ( final String  text,
final boolean  isSigned,
final boolean  isLong 
) throws NumberFormatException
inlinestaticprivate

◆ print() [1/4]

static void com.google.protobuf.TextFormat.print ( final MessageOrBuilder  message,
final Appendable  output 
) throws IOException
inlinestatic

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)

Deprecated:
Use
printer().print(MessageOrBuilder, Appendable)

Definition at line 68 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ print() [2/4]

static void com.google.protobuf.TextFormat.print ( final MessageOrBuilder  message,
final Appendable  output 
) throws IOException
inlinestatic

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)

Deprecated:
Use
printer().print(MessageOrBuilder, Appendable)

Definition at line 73 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ print() [3/4]

static void com.google.protobuf.TextFormat.print ( final UnknownFieldSet  fields,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of

to

.

Deprecated:
Use
printer().print(UnknownFieldSet, Appendable)

Definition at line 79 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ print() [4/4]

static void com.google.protobuf.TextFormat.print ( final UnknownFieldSet  fields,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of

to

.

Deprecated:
Use
printer().print(UnknownFieldSet, Appendable)

Definition at line 84 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printer() [1/2]

static Printer com.google.protobuf.TextFormat.printer ( )
inlinestatic

Printer instance which escapes non-ASCII characters.

Definition at line 282 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printer() [2/2]

static Printer com.google.protobuf.TextFormat.printer ( )
inlinestatic

Printer instance which escapes non-ASCII characters.

Definition at line 287 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printField() [1/2]

static void com.google.protobuf.TextFormat.printField ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

◆ printField() [2/2]

static void com.google.protobuf.TextFormat.printField ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

◆ printFieldToString() [1/2]

static String com.google.protobuf.TextFormat.printFieldToString ( final FieldDescriptor  field,
final Object  value 
)
inlinestatic

◆ printFieldToString() [2/2]

static String com.google.protobuf.TextFormat.printFieldToString ( final FieldDescriptor  field,
final Object  value 
)
inlinestatic

◆ printFieldValue() [1/2]

static void com.google.protobuf.TextFormat.printFieldValue ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of the value of given field value.

Deprecated:
Use
printer().printFieldValue(FieldDescriptor, Object, Appendable)
Parameters
fieldthe descriptor of the field
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 225 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printFieldValue() [2/2]

static void com.google.protobuf.TextFormat.printFieldValue ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of the value of given field value.

Deprecated:
Use
printer().printFieldValue(FieldDescriptor, Object, Appendable)
Parameters
fieldthe descriptor of the field
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 230 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToString() [1/4]

static String com.google.protobuf.TextFormat.printToString ( final MessageOrBuilder  message)
inlinestatic

Like

, but writes directly to a

String

and returns it.

Deprecated:
Use MessageOrBuilder#toString()

Definition at line 143 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToString() [2/4]

static String com.google.protobuf.TextFormat.printToString ( final MessageOrBuilder  message)
inlinestatic

Like

, but writes directly to a

String

and returns it.

Deprecated:
Use
message.toString()

Definition at line 148 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToString() [3/4]

static String com.google.protobuf.TextFormat.printToString ( final UnknownFieldSet  fields)
inlinestatic

Like

, but writes directly to a

String

and returns it.

Deprecated:
Use UnknownFieldSet#toString()

Definition at line 153 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToString() [4/4]

static String com.google.protobuf.TextFormat.printToString ( final UnknownFieldSet  fields)
inlinestatic

Like

, but writes directly to a

String

and returns it.

Deprecated:
Use UnknownFieldSet#toString()

Definition at line 158 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToUnicodeString() [1/4]

static String com.google.protobuf.TextFormat.printToUnicodeString ( final MessageOrBuilder  message)
inlinestatic

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use
printer().escapingNonAscii(false).printToString(MessageOrBuilder)

Definition at line 164 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToUnicodeString() [2/4]

static String com.google.protobuf.TextFormat.printToUnicodeString ( final MessageOrBuilder  message)
inlinestatic

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use
printer().escapingNonAscii(false).printToString(MessageOrBuilder)

Definition at line 169 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToUnicodeString() [3/4]

static String com.google.protobuf.TextFormat.printToUnicodeString ( final UnknownFieldSet  fields)
inlinestatic

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use

Definition at line 175 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printToUnicodeString() [4/4]

static String com.google.protobuf.TextFormat.printToUnicodeString ( final UnknownFieldSet  fields)
inlinestatic

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use

Definition at line 180 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicode() [1/4]

static void com.google.protobuf.TextFormat.printUnicode ( final MessageOrBuilder  message,
final Appendable  output 
) throws IOException
inlinestatic

Same as

, except that non-ASCII characters are not escaped.

Deprecated:
Use
printer().escapingNonAscii(false).print(MessageOrBuilder, Appendable)

Definition at line 90 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicode() [2/4]

static void com.google.protobuf.TextFormat.printUnicode ( final MessageOrBuilder  message,
final Appendable  output 
) throws IOException
inlinestatic

Same as

, except that non-ASCII characters are not escaped.

Deprecated:
Use
printer().escapingNonAscii(false).print(MessageOrBuilder, Appendable)

Definition at line 95 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicode() [3/4]

static void com.google.protobuf.TextFormat.printUnicode ( final UnknownFieldSet  fields,
final Appendable  output 
) throws IOException
inlinestatic

Same as

, except that non-ASCII characters are not escaped.

Deprecated:
Use

Definition at line 101 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicode() [4/4]

static void com.google.protobuf.TextFormat.printUnicode ( final UnknownFieldSet  fields,
final Appendable  output 
) throws IOException
inlinestatic

Same as

, except that non-ASCII characters are not escaped.

Deprecated:
Use

Definition at line 106 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicodeFieldValue() [1/2]

static void com.google.protobuf.TextFormat.printUnicodeFieldValue ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a unicode textual representation of the value of given field value.

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use
Parameters
fieldthe descriptor of the field
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 208 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnicodeFieldValue() [2/2]

static void com.google.protobuf.TextFormat.printUnicodeFieldValue ( final FieldDescriptor  field,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a unicode textual representation of the value of given field value.

Same as

, except that non-ASCII characters in string type fields are not escaped in backslash+octals.

Deprecated:
Use
Parameters
fieldthe descriptor of the field
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 213 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnknownFieldValue() [1/4]

static void com.google.protobuf.TextFormat.printUnknownFieldValue ( final int  tag,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of the value of an unknown field.

Parameters
tagthe field's tag number
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 239 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnknownFieldValue() [2/4]

static void com.google.protobuf.TextFormat.printUnknownFieldValue ( final int  tag,
final Object  value,
final Appendable  output 
) throws IOException
inlinestatic

Outputs a textual representation of the value of an unknown field.

Parameters
tagthe field's tag number
valuethe value of the field
outputthe output to which to append the formatted value
Exceptions
ClassCastExceptionif the value is not appropriate for the given field descriptor
IOExceptionif there is an exception writing to the output

Definition at line 244 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ printUnknownFieldValue() [3/4]

static void com.google.protobuf.TextFormat.printUnknownFieldValue ( final int  tag,
final Object  value,
final TextGenerator  generator 
) throws IOException
inlinestaticprivate

◆ printUnknownFieldValue() [4/4]

static void com.google.protobuf.TextFormat.printUnknownFieldValue ( final int  tag,
final Object  value,
final TextGenerator  generator 
) throws IOException
inlinestaticprivate

◆ shortDebugString() [1/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final FieldDescriptor  field,
final Object  value 
)
inlinestatic

Generates a human readable form of the field, useful for debugging and other purposes, with no newline characters.

Deprecated:
Use

Definition at line 122 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ shortDebugString() [2/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final FieldDescriptor  field,
final Object  value 
)
inlinestatic

Generates a human readable form of the field, useful for debugging and other purposes, with no newline characters.

Deprecated:
Use

Definition at line 127 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ shortDebugString() [3/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final MessageOrBuilder  message)
inlinestatic

Generates a human readable form of this message, useful for debugging and other purposes, with no newline characters. This is just a trivial wrapper around TextFormat.Printer#shortDebugString(MessageOrBuilder).

Definition at line 111 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ shortDebugString() [4/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final MessageOrBuilder  message)
inlinestatic

Generates a human readable form of this message, useful for debugging and other purposes, with no newline characters. This is just a trivial wrapper around TextFormat.Printer#shortDebugString(MessageOrBuilder).

Definition at line 116 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ shortDebugString() [5/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final UnknownFieldSet  fields)
inlinestatic

Generates a human readable form of the unknown fields, useful for debugging and other purposes, with no newline characters.

Deprecated:
Use

Definition at line 133 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ shortDebugString() [6/6]

static String com.google.protobuf.TextFormat.shortDebugString ( final UnknownFieldSet  fields)
inlinestatic

Generates a human readable form of the unknown fields, useful for debugging and other purposes, with no newline characters.

Deprecated:
Use

Definition at line 138 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ singleLineOutput() [1/2]

static TextGenerator com.google.protobuf.TextFormat.singleLineOutput ( Appendable  output)
inlinestaticprivate

◆ singleLineOutput() [2/2]

static TextGenerator com.google.protobuf.TextFormat.singleLineOutput ( Appendable  output)
inlinestaticprivate

◆ unescapeBytes() [1/2]

static ByteString com.google.protobuf.TextFormat.unescapeBytes ( final CharSequence  charString) throws InvalidEscapeSequenceException
inlinestatic

Un-escape a byte sequence as escaped using escapeBytes(ByteString). Two-digit hex escapes (starting with "\x") are also recognized.

Definition at line 2209 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ unescapeBytes() [2/2]

static ByteString com.google.protobuf.TextFormat.unescapeBytes ( final CharSequence  charString) throws InvalidEscapeSequenceException
inlinestatic

Un-escape a byte sequence as escaped using escapeBytes(ByteString). Two-digit hex escapes (starting with "\x") are also recognized.

Definition at line 2297 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ unsignedToString() [1/4]

static String com.google.protobuf.TextFormat.unsignedToString ( final int  value)
inlinestatic

Convert an unsigned 32-bit integer to a string.

Definition at line 704 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ unsignedToString() [2/4]

static String com.google.protobuf.TextFormat.unsignedToString ( final int  value)
inlinestatic

Convert an unsigned 32-bit integer to a string.

Definition at line 789 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ unsignedToString() [3/4]

static String com.google.protobuf.TextFormat.unsignedToString ( final long  value)
inlinestatic

Convert an unsigned 64-bit integer to a string.

Definition at line 713 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

◆ unsignedToString() [4/4]

static String com.google.protobuf.TextFormat.unsignedToString ( final long  value)
inlinestatic

Convert an unsigned 64-bit integer to a string.

Definition at line 798 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.

Member Data Documentation

◆ logger

static final Logger com.google.protobuf.TextFormat.logger = Logger.getLogger(TextFormat.class.getName())
staticprivate

◆ PARSER

static final Parser com.google.protobuf.TextFormat.PARSER = Parser.newBuilder().build()
staticprivate

The documentation for this class was generated from the following file:
com.google.protobuf.TextFormat.printToString
static String printToString(final MessageOrBuilder message)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:143
com.google.protobuf.TextFormat.Printer.escapingNonAscii
Printer escapingNonAscii(boolean escapeNonAscii)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:311
com.google.protobuf.TextFormat.Printer.printFieldValue
void printFieldValue(final FieldDescriptor field, final Object value, final Appendable output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:441
google::protobuf::python::cmessage::UnknownFieldSet
static PyObject * UnknownFieldSet(CMessage *self)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/message.cc:2512
message
char * message
Definition: libuv/docs/code/tty-gravity/main.c:12
com.google.protobuf.TextFormat.Printer.print
void print(final MessageOrBuilder message, final Appendable output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:333
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
profile_analyzer.builder
builder
Definition: profile_analyzer.py:159
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
com.google.protobuf.TextFormat.print
static void print(final MessageOrBuilder message, final Appendable output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:68
com.google.protobuf.TextFormat.printer
static Printer printer()
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:282
com.google.protobuf.TextFormat.Printer.printFieldToString
String printFieldToString(final FieldDescriptor field, final Object value)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:404
profile_analyzer.fields
list fields
Definition: profile_analyzer.py:266
com.google.protobuf.TextFormat.Printer.printField
void printField(final FieldDescriptor field, final Object value, final Appendable output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:414
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197
com.google.protobuf.TextFormat.Printer.printToString
String printToString(final MessageOrBuilder message)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:516
com.google.protobuf.TextFormat.printFieldValue
static void printFieldValue(final FieldDescriptor field, final Object value, final Appendable output)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:225
com.google.protobuf.TextFormat.Printer.shortDebugString
String shortDebugString(final MessageOrBuilder message)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java:540


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:07