Static Private Member Functions | List of all members
com.google.protobuf.Utf8.DecodeUtil Class Reference

Static Private Member Functions

static void handleFourBytes (byte byte1, byte byte2, byte byte3, byte byte4, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static void handleFourBytes (byte byte1, byte byte2, byte byte3, byte byte4, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static void handleOneByte (byte byte1, char[] resultArr, int resultPos)
 
static void handleOneByte (byte byte1, char[] resultArr, int resultPos)
 
static void handleThreeBytes (byte byte1, byte byte2, byte byte3, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static void handleThreeBytes (byte byte1, byte byte2, byte byte3, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static void handleTwoBytes (byte byte1, byte byte2, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static void handleTwoBytes (byte byte1, byte byte2, char[] resultArr, int resultPos) throws InvalidProtocolBufferException
 
static char highSurrogate (int codePoint)
 
static char highSurrogate (int codePoint)
 
static boolean isNotTrailingByte (byte b)
 
static boolean isNotTrailingByte (byte b)
 
static boolean isOneByte (byte b)
 
static boolean isOneByte (byte b)
 
static boolean isThreeBytes (byte b)
 
static boolean isThreeBytes (byte b)
 
static boolean isTwoBytes (byte b)
 
static boolean isTwoBytes (byte b)
 
static char lowSurrogate (int codePoint)
 
static char lowSurrogate (int codePoint)
 
static int trailingByteValue (byte b)
 
static int trailingByteValue (byte b)
 

Detailed Description

Utility methods for decoding bytes into String. Callers are responsible for extracting bytes (possibly using Unsafe methods), and checking remaining bytes. All other UTF-8 validity checks and codepoint conversion happen in this class.

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

Member Function Documentation

◆ handleFourBytes() [1/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleFourBytes ( byte  byte1,
byte  byte2,
byte  byte3,
byte  byte4,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ handleFourBytes() [2/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleFourBytes ( byte  byte1,
byte  byte2,
byte  byte3,
byte  byte4,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ handleOneByte() [1/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleOneByte ( byte  byte1,
char[]  resultArr,
int  resultPos 
)
inlinestaticprivate

◆ handleOneByte() [2/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleOneByte ( byte  byte1,
char[]  resultArr,
int  resultPos 
)
inlinestaticprivate

◆ handleThreeBytes() [1/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleThreeBytes ( byte  byte1,
byte  byte2,
byte  byte3,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ handleThreeBytes() [2/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleThreeBytes ( byte  byte1,
byte  byte2,
byte  byte3,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ handleTwoBytes() [1/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleTwoBytes ( byte  byte1,
byte  byte2,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ handleTwoBytes() [2/2]

static void com.google.protobuf.Utf8.DecodeUtil.handleTwoBytes ( byte  byte1,
byte  byte2,
char[]  resultArr,
int  resultPos 
) throws InvalidProtocolBufferException
inlinestaticprivate

◆ highSurrogate() [1/2]

static char com.google.protobuf.Utf8.DecodeUtil.highSurrogate ( int  codePoint)
inlinestaticprivate

◆ highSurrogate() [2/2]

static char com.google.protobuf.Utf8.DecodeUtil.highSurrogate ( int  codePoint)
inlinestaticprivate

◆ isNotTrailingByte() [1/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isNotTrailingByte ( byte  b)
inlinestaticprivate

Returns whether the byte is not a valid continuation of the form '10XXXXXX'.

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

◆ isNotTrailingByte() [2/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isNotTrailingByte ( byte  b)
inlinestaticprivate

Returns whether the byte is not a valid continuation of the form '10XXXXXX'.

Definition at line 1976 of file protobuf/java/core/src/main/java/com/google/protobuf/Utf8.java.

◆ isOneByte() [1/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isOneByte ( byte  b)
inlinestaticprivate

Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'.

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

◆ isOneByte() [2/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isOneByte ( byte  b)
inlinestaticprivate

Returns whether this is a single-byte codepoint (i.e., ASCII) with the form '0XXXXXXX'.

Definition at line 1906 of file protobuf/java/core/src/main/java/com/google/protobuf/Utf8.java.

◆ isThreeBytes() [1/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isThreeBytes ( byte  b)
inlinestaticprivate

Returns whether this is a three-byte codepoint with the form '110XXXXX'.

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

◆ isThreeBytes() [2/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isThreeBytes ( byte  b)
inlinestaticprivate

Returns whether this is a three-byte codepoint with the form '110XXXXX'.

Definition at line 1916 of file protobuf/java/core/src/main/java/com/google/protobuf/Utf8.java.

◆ isTwoBytes() [1/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isTwoBytes ( byte  b)
inlinestaticprivate

Returns whether this is a two-byte codepoint with the form '10XXXXXX'.

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

◆ isTwoBytes() [2/2]

static boolean com.google.protobuf.Utf8.DecodeUtil.isTwoBytes ( byte  b)
inlinestaticprivate

Returns whether this is a two-byte codepoint with the form '10XXXXXX'.

Definition at line 1911 of file protobuf/java/core/src/main/java/com/google/protobuf/Utf8.java.

◆ lowSurrogate() [1/2]

static char com.google.protobuf.Utf8.DecodeUtil.lowSurrogate ( int  codePoint)
inlinestaticprivate

◆ lowSurrogate() [2/2]

static char com.google.protobuf.Utf8.DecodeUtil.lowSurrogate ( int  codePoint)
inlinestaticprivate

◆ trailingByteValue() [1/2]

static int com.google.protobuf.Utf8.DecodeUtil.trailingByteValue ( byte  b)
inlinestaticprivate

Returns the actual value of the trailing byte (removes the prefix '10') for composition.

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

◆ trailingByteValue() [2/2]

static int com.google.protobuf.Utf8.DecodeUtil.trailingByteValue ( byte  b)
inlinestaticprivate

Returns the actual value of the trailing byte (removes the prefix '10') for composition.

Definition at line 1981 of file protobuf/java/core/src/main/java/com/google/protobuf/Utf8.java.


The documentation for this class was generated from the following file:


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