| Modifier and Type | Field and Description |
|---|---|
protected int |
length |
| Modifier and Type | Method and Description |
|---|---|
RepeatedByte |
add(byte value) |
RepeatedByte |
addAll(byte[] values) |
RepeatedByte |
addAll(byte[] buffer,
int offset,
int length) |
void |
addAll(RepeatedByte values) |
int |
addLength(int length)
Sets the length to length + offset and returns
the previous length.
|
byte[] |
array()
Provides access to the internal storage array.
|
int |
capacity() |
protected void |
checkIndex(int index) |
RepeatedType |
clear()
Sets the output length to zero and performs any
necessary cleanup of the content.
|
RepeatedByte |
copyFrom(byte[] buffer) |
RepeatedByte |
copyFrom(byte[] buffer,
int offset,
int length) |
void |
copyFrom(RepeatedByte other) |
boolean |
equals(Object o) |
protected void |
extendCapacityTo(int desiredSize) |
byte |
get(int index) |
protected Byte |
getValueAt(int index) |
int |
hashCode()
Repeated fields have no immutable state and should not
be used in hashing structures.
|
us.hebi.quickbuf.RepeatedField.GenericIterator |
iterator() |
int |
length() |
static RepeatedByte |
newEmptyInstance() |
static RepeatedByte |
newInstance(byte[] initialValue) |
int |
remainingCapacity() |
RepeatedType |
reserve(int count)
Makes sure that the internal storage capacity has space for
at least the requested number of entries.
|
RepeatedByte |
set(int index,
byte value) |
RepeatedByte |
setInternalArray(byte[] array)
Gifts ownership of the supplied array and uses it as the internal storage array.
|
RepeatedByte |
setInternalArray(byte[] array,
int length) |
RepeatedByte |
setLength(int length)
Sets the absolute length of the data that can be serialized.
|
byte[] |
toArray()
Creates a copy of the valid data contained in the
internal storage.
|
String |
toString() |
RepeatedByte |
writeTo(ByteBuffer buffer) |
RepeatedByte |
writeTo(OutputStream outputStream) |
RepeatedByte |
writeTo(ProtoSink sink) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static RepeatedByte newEmptyInstance()
public static RepeatedByte newInstance(byte[] initialValue)
protected void extendCapacityTo(int desiredSize)
protected Byte getValueAt(int index)
public byte get(int index)
public RepeatedByte set(int index, byte value)
public RepeatedByte add(byte value)
public RepeatedByte addAll(byte[] values)
public RepeatedByte addAll(byte[] buffer, int offset, int length)
public RepeatedByte copyFrom(byte[] buffer)
public RepeatedByte copyFrom(byte[] buffer, int offset, int length)
public void addAll(RepeatedByte values)
public void copyFrom(RepeatedByte other)
public RepeatedByte setInternalArray(byte[] array)
array - array with valid data from zero to lengthpublic RepeatedByte setInternalArray(byte[] array, int length)
public int capacity()
public final byte[] toArray()
public final byte[] array()
The array may be larger than the amount of contained data, but the data is only valid between index 0 and length.
public final RepeatedByte setLength(int length)
This does not change the underlying data, so setting a length longer than the current one may result in arbitrary data being serialized.
length - desired lengthpublic final int addLength(int length)
It is expected that users don't know the exact desired size, so the growth rate is the same as a generic ArrayList.
See setLength(int)
length - added to the current lengthpublic RepeatedByte writeTo(ProtoSink sink) throws IOException
IOExceptionpublic RepeatedByte writeTo(OutputStream outputStream) throws IOException
IOExceptionpublic RepeatedByte writeTo(ByteBuffer buffer)
public final int length()
public final int remainingCapacity()
public us.hebi.quickbuf.RepeatedField.GenericIterator iterator()
public final RepeatedType reserve(int count)
count - number of entries to be addedpublic RepeatedType clear()
protected final void checkIndex(int index)
Copyright © 2019–2024 HEBI Robotics. All rights reserved.