MCPcopy Create free account
hub / github.com/beanshell/beanshell / putByteArray

Method putByteArray

src/bsh/org/objectweb/asm/ByteVector.java:264–277  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 3

resizeInstructionsMethod · 0.95
toByteArrayMethod · 0.95
putMethod · 0.80

Calls 1

enlargeMethod · 0.95

Tested by

no test coverage detected