Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary. @param b an array of bytes. May be null to put len null bytes into this byte vector. @param off index of the fist byte of b that must be copied. @param len number of bytes of
(
final byte[] b,
final int off,
final int len)
| 262 | */ |
| 263 | |
| 264 | public ByteVector putByteArray ( |
| 265 | final byte[] b, |
| 266 | final int off, |
| 267 | final int len) |
| 268 | { |
| 269 | if (length + len > data.length) { |
| 270 | enlarge(len); |
| 271 | } |
| 272 | if (b != null) { |
| 273 | System.arraycopy(b, off, data, length, len); |
| 274 | } |
| 275 | length += len; |
| 276 | return this; |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Enlarge this byte vector so that it can receive n more bytes. |
no test coverage detected