|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.joe_e.array.ConstArray.Builder<E> org.joe_e.array.ImmutableArray.Builder<E> org.joe_e.array.PowerlessArray.Builder<Byte> org.joe_e.array.ByteArray.Builder
public static final class ByteArray.Builder
A ByteArray
factory.
Method Summary | |
---|---|
void |
append(byte newByte)
Append a byte |
void |
append(Byte newByte)
Append a Byte |
void |
append(byte[] newBytes)
Append an array of byte s |
void |
append(Byte[] newBytes)
Append an array of Bytes s |
void |
append(byte[] newBytes,
int off,
int len)
Append a range of elements from an array of byte s |
void |
append(Byte[] newBytes,
int off,
int len)
Append a range of elements from an array of Byte s |
ByteArray.BuilderOutputStream |
asOutputStream()
Convenience method that creates an output stream using this Builder |
ByteArray |
snapshot()
Create a snapshot of the current content. |
Methods inherited from class org.joe_e.array.ConstArray.Builder |
---|
length |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void append(Byte newByte)
Byte
append
in interface ArrayBuilder<Byte>
append
in class PowerlessArray.Builder<Byte>
newByte
- the element to add
IndexOutOfBoundsException
- if the resulting array would exceed
the maximum length of a Java array. The builder is unmodified.public void append(Byte[] newBytes)
Bytes
s
append
in interface ArrayBuilder<Byte>
append
in class PowerlessArray.Builder<Byte>
newBytes
- the elements to add
IndexOutOfBoundsException
- if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.public void append(Byte[] newBytes, int off, int len)
Byte
s
append
in interface ArrayBuilder<Byte>
append
in class PowerlessArray.Builder<Byte>
newBytes
- the array to add elements fromoff
- the index of the first element to addlen
- the number of elements to add
IndexOutOfBoundsException
- if an out-of-bounds index would
be referenced or the resulting internal array would exceed the
maximum length of a Java array. The builder is unmodified.public ByteArray snapshot()
snapshot
in interface ArrayBuilder<Byte>
snapshot
in class PowerlessArray.Builder<Byte>
ByteArray
containing the elements so farpublic void append(byte newByte)
byte
newByte
- the element to add
IndexOutOfBoundsException
- if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.public void append(byte[] newBytes)
byte
s
newBytes
- the elements to add
IndexOutOfBoundsException
- if the resulting internal array
would exceed the maximum length of a Java array. The builder is
unmodified.public void append(byte[] newBytes, int off, int len)
byte
s
newBytes
- the array to add elements fromoff
- the index of the first element to addlen
- the number of elements to add
IndexOutOfBoundsException
- if an out-of-bounds index would
be referenced or the resulting internal array would exceed the
maximum length of a Java array. The builder is unmodified.public ByteArray.BuilderOutputStream asOutputStream()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |