public class ByteList extends ElementList
Modifier and Type | Field and Description |
---|---|
protected byte[] |
list
Element container.
|
size
Constructor and Description |
---|
ByteList()
Default constructor.
|
ByteList(int capacity)
Constructor, specifying an initial internal array size.
|
Modifier and Type | Method and Description |
---|---|
ByteList |
add(byte[] elements)
Adds elements to the container.
|
ByteList |
add(byte[] elements,
int start,
int end)
Adds a part of the specified elements to the container.
|
ByteList |
add(int element)
Adds an element to the array.
|
byte[] |
finish()
Returns an array with all elements and invalidates the internal array.
|
byte |
get(int index)
Returns the element at the specified index position.
|
byte[] |
next()
Returns an array with all elements and resets the array size.
|
byte[] |
toArray()
Returns an array with all elements.
|
String |
toString() |
public ByteList()
public ByteList(int capacity)
capacity
- initial array capacitypublic ByteList add(int element)
element
- element to be added; will be cast to a bytepublic ByteList add(byte[] elements)
elements
- elements to be addedpublic ByteList add(byte[] elements, int start, int end)
elements
- elements to be addedstart
- start positionend
- end positionpublic final byte get(int index)
index
- index of the element to returnpublic byte[] toArray()
public final byte[] next()
public byte[] finish()
Copyright © 2005–2015 BaseX Team. All rights reserved.