Interface BytesModifiable
-
- All Superinterfaces:
Bytes
- All Known Implementing Classes:
BytesArray
public interface BytesModifiable extends Bytes
Strings are encoded and decoded using the UTF-8 charset (multi-byte charsets just aren't worth the increased complication in indexing).- Author:
- hogye
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappend(byte v)voidappend(byte[] vs)voidappend(byte[] vs, int from, int to)voidappend(Bytes vs)voidappend(Bytes vs, int from, int to)voidappend(String s)voidappend(String s, int from, int to)voidappend(ByteBuffer vs)voidappend(ByteBuffer vs, int c)voidclear()voidcompact()BytesModifiablecopy()voidensureCapacity(int minCapacity)voidinsert(int i, byte v)voidinsert(int i, byte[] vs)voidinsert(int i, byte[] vs, int from, int to)voidinsert(int i, Bytes vs)voidinsert(int i, Bytes vs, int from, int to)voidinsert(int i, String s)voidinsert(int i, String s, int from, int to)voidinsert(int i, ByteBuffer vs)voidinsert(int i, ByteBuffer vs, int c)voidprepend(byte v)voidprepend(byte[] vs)voidprepend(byte[] vs, int from, int to)voidprepend(Bytes vs)voidprepend(Bytes vs, int from, int to)voidprepend(String s)voidprepend(String s, int from, int to)voidprepend(ByteBuffer vs)voidprepend(ByteBuffer vs, int c)voidremove(byte v)Removes a single copy of the specified value.voidremoveIndex(int index)Remove value at index.voidremoveRange(int from, int to)Removes values starting at index from (inclusive) to index to (exclusive).voidset(int i, byte v)voidset(int i, byte[] vs)voidset(int i, byte[] vs, int from, int to)
-
-
-
Method Detail
-
set
void set(int i, byte v)
-
set
void set(int i, byte[] vs)
-
set
void set(int i, byte[] vs, int from, int to)
-
insert
void insert(int i, byte v)
-
insert
void insert(int i, byte[] vs)
-
insert
void insert(int i, Bytes vs)
-
insert
void insert(int i, String s)
-
insert
void insert(int i, ByteBuffer vs)
-
insert
void insert(int i, byte[] vs, int from, int to)
-
insert
void insert(int i, Bytes vs, int from, int to)
-
insert
void insert(int i, String s, int from, int to)
-
insert
void insert(int i, ByteBuffer vs, int c)
-
append
void append(byte v)
-
append
void append(byte[] vs)
-
append
void append(Bytes vs)
-
append
void append(String s)
-
append
void append(ByteBuffer vs)
-
append
void append(byte[] vs, int from, int to)
-
append
void append(Bytes vs, int from, int to)
-
append
void append(String s, int from, int to)
-
append
void append(ByteBuffer vs, int c)
-
prepend
void prepend(byte v)
-
prepend
void prepend(byte[] vs)
-
prepend
void prepend(Bytes vs)
-
prepend
void prepend(String s)
-
prepend
void prepend(ByteBuffer vs)
-
prepend
void prepend(byte[] vs, int from, int to)
-
prepend
void prepend(Bytes vs, int from, int to)
-
prepend
void prepend(String s, int from, int to)
-
prepend
void prepend(ByteBuffer vs, int c)
-
remove
void remove(byte v)
Removes a single copy of the specified value. If multiple copies are present, there is no guarantee which one will be removed.
-
removeRange
void removeRange(int from, int to)Removes values starting at index from (inclusive) to index to (exclusive). All other values with indices greater than or equal to index to have their index in the array decreased by to-from and the size of the array is decreased by to-from.
-
removeIndex
void removeIndex(int index)
Remove value at index. All other values with indices greater than index have their index in the array decreased by one and the size of the array is decreased by one.
-
clear
void clear()
-
ensureCapacity
void ensureCapacity(int minCapacity)
-
compact
void compact()
-
copy
BytesModifiable copy()
-
-