Class TextSpan (2.31.0)

public final class TextSpan extends GeneratedMessageV3 implements TextSpanOrBuilder

Represents a text span in the input document.

Protobuf type google.cloud.language.v2.TextSpan

Implements

TextSpanOrBuilder

Static Fields

BEGIN_OFFSET_FIELD_NUMBER

public static final int BEGIN_OFFSET_FIELD_NUMBER
Field Value
TypeDescription
int

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TextSpan getDefaultInstance()
Returns
TypeDescription
TextSpan

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static TextSpan.Builder newBuilder()
Returns
TypeDescription
TextSpan.Builder

newBuilder(TextSpan prototype)

public static TextSpan.Builder newBuilder(TextSpan prototype)
Parameter
NameDescription
prototypeTextSpan
Returns
TypeDescription
TextSpan.Builder

parseDelimitedFrom(InputStream input)

public static TextSpan parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSpan parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TextSpan parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TextSpan parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TextSpan parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TextSpan parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TextSpan parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSpan parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TextSpan parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSpan parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TextSpan parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TextSpan
Exceptions
TypeDescription
InvalidProt