Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary. @param byteArrayValue an array of bytes. May be null to put byteLength null bytes into this byte vector. @param byteOffset index of the first byte of byteArrayValue that must
(
final byte[] byteArrayValue, final int byteOffset, final int byteLength)
| 334 | * @return this byte vector. |
| 335 | */ |
| 336 | public ByteVector putByteArray( |
| 337 | final byte[] byteArrayValue, final int byteOffset, final int byteLength) { |
| 338 | if (length + byteLength > data.length) { |
| 339 | enlarge(byteLength); |
| 340 | } |
| 341 | if (byteArrayValue != null) { |
| 342 | System.arraycopy(byteArrayValue, byteOffset, data, length, byteLength); |
| 343 | } |
| 344 | length += byteLength; |
| 345 | return this; |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Enlarges this byte vector so that it can receive 'size' more bytes. |
no test coverage detected