Modifier and Type | Field and Description |
---|---|
static ByteString |
ByteString.EMPTY
Empty
ByteString . |
Modifier and Type | Method and Description |
---|---|
static ByteString |
Internal.bytesDefaultValue(java.lang.String bytes)
Helper called by generated code to construct default values for bytes fields.
|
ByteString |
ByteString.concat(ByteString other)
Concatenate the given
ByteString to this one. |
static ByteString |
ByteString.copyFrom(byte[] bytes)
Copies the given bytes into a
ByteString . |
static ByteString |
ByteString.copyFrom(byte[] bytes,
int offset,
int size)
Copies the given bytes into a
ByteString . |
static ByteString |
ByteString.copyFrom(java.nio.ByteBuffer bytes)
Copies the remaining bytes from a
java.nio.ByteBuffer into a ByteString . |
static ByteString |
ByteString.copyFrom(java.nio.ByteBuffer bytes,
int size)
Copies the next
size bytes from a java.nio.ByteBuffer into a ByteString . |
static ByteString |
ByteString.copyFrom(java.lang.Iterable<ByteString> byteStrings)
Concatenates all byte strings in the iterable and returns the result.
|
static ByteString |
ByteString.copyFrom(java.lang.String text,
java.lang.String charsetName)
Encodes
text into a sequence of bytes using the named charset and returns the result as a
ByteString . |
static ByteString |
ByteString.copyFromUtf8(java.lang.String text)
Encodes
text into a sequence of UTF-8 bytes and returns the result as a ByteString . |
ByteString |
LazyStringList.getByteString(int index)
Returns the element at the specified position in this list as a ByteString.
|
ByteString |
CodedInputStream.readBytes()
Read a
bytes field value from the stream. |
static ByteString |
ByteString.readFrom(java.io.InputStream streamToDrain)
Completely reads the given stream's bytes into a
ByteString , blocking if necessary until all bytes are
read through to the end of the stream. |
static ByteString |
ByteString.readFrom(java.io.InputStream streamToDrain,
int chunkSize)
Completely reads the given stream's bytes into a
ByteString , blocking if necessary until all bytes are
read through to the end of the stream. |
static ByteString |
ByteString.readFrom(java.io.InputStream streamToDrain,
int minChunkSize,
int maxChunkSize) |
ByteString |
ByteString.substring(int beginIndex)
Return the substring from
beginIndex , inclusive, to the end of the string. |
abstract ByteString |
ByteString.substring(int beginIndex,
int endIndex)
Return the substring from
beginIndex , inclusive, to endIndex , exclusive. |
ByteString |
MessageLite.toByteString()
Serializes the message to a
ByteString and returns it. |
ByteString |
LazyFieldLite.toByteString()
Returns a BytesString for this field in a thread-safe way.
|
ByteString |
ByteString.Output.toByteString()
Creates a byte string.
|
ByteString |
AbstractMessageLite.toByteString() |
ByteString |
GeneratedMessageLite.Visitor.visitByteString(boolean minePresent,
ByteString mine,
boolean otherPresent,
ByteString other) |
ByteString |
GeneratedMessageLite.MergeFromVisitor.visitByteString(boolean minePresent,
ByteString mine,
boolean otherPresent,
ByteString other) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ByteString> |
ProtocolStringList.asByteStringList()
Returns a view of the data as a list of ByteStrings.
|
Modifier and Type | Method and Description |
---|---|
void |
LazyStringList.add(ByteString element)
Appends the specified element to the end of this list (optional operation).
|
protected static void |
AbstractMessageLite.checkByteStringIsUtf8(ByteString byteString)
Checks wheter a ByteString is encoded in Utf-8.
|
static int |
CodedOutputStream.computeBytesSize(int fieldNumber,
ByteString value)
Compute the number of bytes that would be needed to encode a
bytes field, including tag. |
static int |
CodedOutputStream.computeBytesSizeNoTag(ByteString value)
Compute the number of bytes that would be needed to encode a
bytes field. |
static int |
CodedOutputStream.computeRawMessageSetExtensionSize(int fieldNumber,
ByteString value)
Compute the number of bytes that would be needed to encode an unparsed MessageSet extension field to the stream.
|
ByteString |
ByteString.concat(ByteString other)
Concatenate the given
ByteString to this one. |
boolean |
ByteString.endsWith(ByteString suffix)
Tests if this bytestring ends with the specified suffix.
|
static boolean |
Internal.isValidUtf8(ByteString byteString)
Helper called by generated code to determine if a byte array is a valid UTF-8 encoded string such that the
original bytes can be converted to a String object and then back to a byte array round tripping the bytes without
loss.
|
MessageLite.Builder |
MessageLite.Builder.mergeFrom(ByteString data)
Parse
data as a message of this type and merge it with the message being built. |
BuilderType |
AbstractMessageLite.Builder.mergeFrom(ByteString data) |
MessageLite.Builder |
MessageLite.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry)
Parse
data as a message of this type and merge it with the message being built. |
BuilderType |
AbstractMessageLite.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
protected void |
GeneratedMessageLite.mergeLengthDelimitedField(int fieldNumber,
ByteString value)
Called by subclasses to parse an unknown field.
|
java.util.Map.Entry<K,V> |
MapEntryLite.parseEntry(ByteString bytes,
ExtensionRegistryLite extensionRegistry)
Parses an entry off of the input as a
Map.Entry . |
MessageType |
Parser.parseFrom(ByteString data)
Parses
data as a message of MessageType . |
MessageType |
AbstractParser.parseFrom(ByteString data) |
MessageType |
Parser.parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry)
Parses
data as a message of MessageType . |
MessageType |
AbstractParser.parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
protected static <T extends GeneratedMessageLite<T,?>> |
GeneratedMessageLite.parseFrom(T defaultInstance,
ByteString data) |
protected static <T extends GeneratedMessageLite<T,?>> |
GeneratedMessageLite.parseFrom(T defaultInstance,
ByteString data,
ExtensionRegistryLite extensionRegistry) |
MessageType |
Parser.parsePartialFrom(ByteString data)
Like
Parser.parseFrom(ByteString) , but does not throw an exception if the message is missing required fields. |
MessageType |
AbstractParser.parsePartialFrom(ByteString data) |
MessageType |
Parser.parsePartialFrom(ByteString data,
ExtensionRegistryLite extensionRegistry)
Like
Parser.parseFrom(ByteString, ExtensionRegistryLite) , but does not throw an exception if the message is
missing required fields. |
MessageType |
AbstractParser.parsePartialFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
void |
LazyStringList.set(int index,
ByteString element)
Replaces the element at the specified position in this list with the specified element (optional operation).
|
void |
LazyFieldLite.setByteString(ByteString bytes,
ExtensionRegistryLite extensionRegistry)
Sets this field with bytes to delay-parse.
|
boolean |
ByteString.startsWith(ByteString prefix)
Tests if this bytestring starts with the specified prefix.
|
ByteString |
GeneratedMessageLite.Visitor.visitByteString(boolean minePresent,
ByteString mine,
boolean otherPresent,
ByteString other) |
ByteString |
GeneratedMessageLite.MergeFromVisitor.visitByteString(boolean minePresent,
ByteString mine,
boolean otherPresent,
ByteString other) |
abstract void |
CodedOutputStream.writeBytes(int fieldNumber,
ByteString value)
Write a
bytes field, including tag, to the stream. |
abstract void |
CodedOutputStream.writeBytesNoTag(ByteString value)
Write a
bytes field to the stream. |
void |
CodedOutputStream.writeRawBytes(ByteString value)
Write a byte string.
|
abstract void |
CodedOutputStream.writeRawMessageSetExtension(int fieldNumber,
ByteString value)
Write an unparsed MessageSet extension field to the stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
LazyStringList.addAllByteString(java.util.Collection<? extends ByteString> c)
Appends all elements in the specified ByteString collection to the end of this list.
|
static ByteString |
ByteString.copyFrom(java.lang.Iterable<ByteString> byteStrings)
Concatenates all byte strings in the iterable and returns the result.
|
Constructor and Description |
---|
LazyField(MessageLite defaultInstance,
ExtensionRegistryLite extensionRegistry,
ByteString bytes) |
LazyFieldLite(ExtensionRegistryLite extensionRegistry,
ByteString bytes)
Constructs a LazyFieldLite with bytes that will be parsed lazily.
|