Send feedback
Class TruncatableString (2.32.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.32.0 keyboard_arrow_down
public final class TruncatableString extends GeneratedMessageV3 implements TruncatableStringOrBuilder
Represents a string that might be shortened to a specified length.
Protobuf type google.devtools.cloudtrace.v2.TruncatableString
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int TRUNCATED_BYTE_COUNT_FIELD_NUMBER
Field Value Type Description int
public static final int VALUE_FIELD_NUMBER
Field Value Type Description int
Static Methods
public static TruncatableString getDefaultInstance ()
public static final Descriptors . Descriptor getDescriptor ()
public static TruncatableString . Builder newBuilder ()
public static TruncatableString . Builder newBuilder ( TruncatableString prototype )
public static TruncatableString parseDelimitedFrom ( InputStream input )
public static TruncatableString parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static TruncatableString parseFrom ( byte [] data )
Parameter Name Description data
byte []
public static TruncatableString parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
public static TruncatableString parseFrom ( ByteString data )
public static TruncatableString parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static TruncatableString parseFrom ( CodedInputStream input )
public static TruncatableString parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static TruncatableString parseFrom ( InputStream input )
public static TruncatableString parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static TruncatableString parseFrom ( ByteBuffer data )
public static TruncatableString parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
public static Parser<TruncatableString> parser ()
Methods
public boolean equals ( Object obj )
Parameter Name Description obj
Object
Overrides
public TruncatableString getDefaultInstanceForType ()
public Parser<TruncatableString> getParserForType ()
Overrides
public int getSerializedSize ()
Returns Type Description int
Overrides
public int getTruncatedByteCount ()
The number of bytes removed from the original string. If this
value is 0, then the string was not shortened.
int32 truncated_byte_count = 2;
Returns Type Description int
The truncatedByteCount.
The shortened string. For example, if the original string is 500
bytes long and the limit of the string is 128 bytes, then
value
contains the first 128 bytes of the 500-byte string.
Truncation always happens on a UTF8 character boundary. If there
are multi-byte characters in the string, then the length of the
shortened string might be less than the size limit.
string value = 1;
Returns Type Description String
The value.
public ByteString getValueBytes ()
The shortened string. For example, if the original string is 500
bytes long and the limit of the string is 128 bytes, then
value
contains the first 128 bytes of the 500-byte string.
Truncation always happens on a UTF8 character boundary. If there
are multi-byte characters in the string, then the length of the
shortened string might be less than the size limit.
string value = 1;
Returns Type Description ByteString
The bytes for value.
Returns Type Description int
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
public final boolean isInitialized ()
Overrides
public TruncatableString . Builder newBuilderForType ()
protected TruncatableString . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
public TruncatableString . Builder toBuilder ()
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]