Modifier and Type | Field and Description |
---|---|
static ByteString |
ByteString.EMPTY
Empty
ByteString . |
Modifier and Type | Method and Description |
---|---|
static ByteString |
Internal.bytesDefaultValue(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(ByteBuffer bytes)
Copies the remaining bytes from a
java.nio.ByteBuffer into
a ByteString . |
static ByteString |
ByteString.copyFrom(ByteBuffer bytes,
int size)
Copies the next
size bytes from a java.nio.ByteBuffer into
a ByteString . |
static ByteString |
ByteString.copyFrom(Iterable<ByteString> byteStrings)
Concatenates all byte strings in the iterable and returns the result.
|
static ByteString |
ByteString.copyFrom(String text,
String charsetName)
Encodes
text into a sequence of bytes using the named charset
and returns the result as a ByteString . |
static ByteString |
ByteString.copyFromUtf8(String text)
Encodes
text into a sequence of UTF-8 bytes and returns the
result as a ByteString . |
ByteString |
UnmodifiableLazyStringList.getByteString(int index) |
ByteString |
LazyStringArrayList.getByteString(int index) |
ByteString |
LazyStringList.getByteString(int index)
Returns the element at the specified position in this list as a ByteString.
|
ByteString |
GeneratedMessageLite.Builder.getUnknownFields() |
ByteString |
CodedInputStream.readBytes()
Read a
bytes field value from the stream. |
static ByteString |
ByteString.readFrom(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(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(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 |
UnknownFieldSet.toByteString()
Serializes the message to a
ByteString and returns it. |
ByteString |
LazyFieldLite.toByteString() |
ByteString |
AbstractMessageLite.toByteString() |
ByteString |
MessageLite.toByteString()
Serializes the message to a
ByteString and returns it. |
ByteString |
ByteString.Output.toByteString()
Creates a byte string.
|
Modifier and Type | Method and Description |
---|---|
List<ByteString> |
UnmodifiableLazyStringList.asByteStringList() |
List<ByteString> |
LazyStringArrayList.asByteStringList() |
List<ByteString> |
ProtocolStringList.asByteStringList()
Returns a view of the data as a list of ByteStrings.
|
List<ByteString> |
UnknownFieldSet.Field.getLengthDelimitedList()
Get the list of length-delimited values for this field.
|
Modifier and Type | Method and Description |
---|---|
void |
UnmodifiableLazyStringList.add(ByteString element) |
void |
LazyStringArrayList.add(ByteString element) |
void |
LazyStringList.add(ByteString element)
Appends the specified element to the end of this list (optional
operation).
|
UnknownFieldSet.Field.Builder |
UnknownFieldSet.Field.Builder.addLengthDelimited(ByteString value)
Add a length-delimited value.
|
protected static void |
AbstractMessageLite.checkByteStringIsUtf8(ByteString byteString) |
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.
|
UnknownFieldSet.Builder |
UnknownFieldSet.Builder.mergeFrom(ByteString data)
Parse
data as an UnknownFieldSet and merge it with the
set being built. |
BuilderType |
AbstractMessage.Builder.mergeFrom(ByteString data) |
Message.Builder |
Message.Builder.mergeFrom(ByteString data) |
BuilderType |
AbstractMessageLite.Builder.mergeFrom(ByteString data) |
MessageLite.Builder |
MessageLite.Builder.mergeFrom(ByteString data)
Parse
data as a message of this type and merge it with the
message being built. |
UnknownFieldSet.Builder |
UnknownFieldSet.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
BuilderType |
AbstractMessage.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
Message.Builder |
Message.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
BuilderType |
AbstractMessageLite.Builder.mergeFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
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. |
MessageType |
AbstractParser.parseFrom(ByteString data) |
static UnknownFieldSet |
UnknownFieldSet.parseFrom(ByteString data)
Parse
data as an UnknownFieldSet and return it. |
MessageType |
Parser.parseFrom(ByteString data)
Parses
data as a message of MessageType . |
MessageType |
AbstractParser.parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
MessageType |
Parser.parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry)
Parses
data as a message of MessageType . |
static DynamicMessage |
DynamicMessage.parseFrom(Descriptors.Descriptor type,
ByteString data)
Parse
data as a message of the given type and return it. |
static DynamicMessage |
DynamicMessage.parseFrom(Descriptors.Descriptor type,
ByteString data,
ExtensionRegistry extensionRegistry)
Parse
data as a message of the given type and return it. |
MessageType |
AbstractParser.parsePartialFrom(ByteString data) |
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,
ExtensionRegistryLite extensionRegistry) |
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. |
void |
UnmodifiableLazyStringList.set(int index,
ByteString element) |
void |
LazyStringArrayList.set(int index,
ByteString s) |
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) |
BuilderType |
GeneratedMessageLite.Builder.setUnknownFields(ByteString unknownFields) |
boolean |
ByteString.startsWith(ByteString prefix)
Tests if this bytestring starts with the specified prefix.
|
void |
CodedOutputStream.writeBytes(int fieldNumber,
ByteString value)
Write a
bytes field, including tag, to the stream. |
void |
CodedOutputStream.writeBytesNoTag(ByteString value)
Write a
bytes field to the stream. |
void |
CodedOutputStream.writeRawBytes(ByteString value)
Write a byte string.
|
void |
CodedOutputStream.writeRawBytes(ByteString value,
int offset,
int length)
Write part of a byte string.
|
void |
CodedOutputStream.writeRawMessageSetExtension(int fieldNumber,
ByteString value)
Write an unparsed MessageSet extension field to the stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
UnmodifiableLazyStringList.addAllByteString(Collection<? extends ByteString> element) |
boolean |
LazyStringArrayList.addAllByteString(Collection<? extends ByteString> values) |
boolean |
LazyStringList.addAllByteString(Collection<? extends ByteString> c)
Appends all elements in the specified ByteString collection to the end of
this list.
|
static ByteString |
ByteString.copyFrom(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) |
Copyright © 2008-2014 Google. All Rights Reserved.