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 handleOneByte (byte byte1, char[] resultArr, int resultPos)
 
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 char highSurrogate (int codePoint)
 
static boolean isNotTrailingByte (byte b)
 
static boolean isOneByte (byte b)
 
static boolean isThreeBytes (byte b)
 
static boolean isTwoBytes (byte b)
 
static char lowSurrogate (int codePoint)
 
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 Utf8.java.

Member Function Documentation

◆ handleFourBytes()

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

Definition at line 1930 of file Utf8.java.

◆ handleOneByte()

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

Definition at line 1900 of file Utf8.java.

◆ handleThreeBytes()

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

Definition at line 1914 of file Utf8.java.

◆ handleTwoBytes()

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

Definition at line 1904 of file Utf8.java.

◆ highSurrogate()

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

Definition at line 1965 of file Utf8.java.

◆ isNotTrailingByte()

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 Utf8.java.

◆ isOneByte()

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 Utf8.java.

◆ isThreeBytes()

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 Utf8.java.

◆ isTwoBytes()

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 Utf8.java.

◆ lowSurrogate()

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

Definition at line 1970 of file Utf8.java.

◆ trailingByteValue()

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 Utf8.java.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08