Return the response body as a byte array.

@since 3.0.5
512005
public byte[] getResponseBodyAsByteArray() {
        final ByteBuf bodyByteBuf = httpInputMessage.getBody();
        final byte[] bytes = new byte[bodyByteBuf.readableBytes()];
        bodyByteBuf.readBytes(bytes);
        return bytes;
    }
262910
public byte[] getAsBytes() {

        byte[] ret = new byte[pBytes.length];
        System.arraycopy(pBytes, 0, ret, 0, pBytes.length); //make sure we keep our own copy.
        return ret;
    }
438482
@Override
    public byte[] getBody() throws AuthFailureError {
        if (mOutput == null) {
            openOutput();
        }
        try {
            if (mMultipart) {

                mOutput.write(CRLF + "--" + BOUNDARY + "--" + CRLF);
            }
            return mOutput.toByteArray();
        } catch (IOException e) {
            e.printStackTrace();
            return mOutput.toByteArray();
        } finally {
            try {
                mOutput.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            mOutput = null;
        }

    }
677888
public byte[] getBytes()
	{
		byte b[] = new byte[getLength()];
		int bytesCopied = 0;

		Iterator<V> it = this.values().iterator();
		while (it.hasNext())
		{
			ID3v2Frame frame = (ID3v2Frame) it.next();
			System.arraycopy(frame.getFrameBytes(), 0, b, bytesCopied, frame.getFrameLength());
			bytesCopied += frame.getFrameLength();
		}

		return b;
	}
475241
public byte[] toByteArray() {
        return collectSized(ByteBuffer::new, ByteBuffer::add, ByteBuffer::addAll, ByteBuffer::new,
            ByteBuffer::addUnsafe).toArray();
    }
1104982
public static byte[] getBodyBytes(ServletRequest request) {
		try {
			return IoUtil.readBytes(request.getInputStream());
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
334970
public byte []
readByteArray() {
	int len = remaining();
	byte [] out = new byte[len];
	byteBuffer.get(out, 0, len);
	return out;
}
458945
public byte[] getBytes() {
        byte[] retval = new byte[buffer.b().position()];
        int position = buffer.b().position();
        buffer.b().rewind();
        buffer.b().get(retval);
        assert position == buffer.b().position();
        return retval;
    }
1059583
public final byte[] getBytes() {
		final int length = bytes.length;
		final byte[] result = new byte[length];

		// Make a defensive copy
		System.arraycopy(bytes, 0, result, 0, length);

		return result;
	}
580568
public function bodyToArray()
    {
        // Getting response content
        $jsonContent = $this->response->getContent();

        // Wrapping it into a Json reader object and convert it to array
        $jsonReader = new Json();
        return $jsonReader->fromString($jsonContent);
    }
790767
public byte[] toArray() {
    byte[] copy = new byte[length];
    System.arraycopy(data, offset, copy, 0, length);
    return copy;
  }
297892
@Override
	public ByteArray encodeAsByteArray() {
		if(message.isEmpty()) return ByteArray.EMPTY_BYTE_ARRAY;

		return new ByteArray(message.getBytes(CHARSET));
	}
176982
@Override
	public byte[] bytes() {
		return concat(b64UrlEncode(header.bytes()), JwtHelper.PERIOD,
				b64UrlEncode(content), JwtHelper.PERIOD, b64UrlEncode(crypto));
	}
750475
public byte[] asByteArray() {
        Objects.requireNonNull(data);
        byte[] ret = Arrays.copyOf(data, data.length);
        Arrays.fill(data, (byte) 0);
        data = null;
        return ret;
    }
132980
public byte[] getBytes() {
    final byte[] bytes = new byte[qualifier.length + value.length];
    System.arraycopy(this.qualifier, 0, bytes, 0, qualifier.length);
    System.arraycopy(value, 0, bytes, qualifier.length, value.length);
    return bytes;
  }
412072
public byte[] toBytes() throws IOException {
    final ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
    final BitOutputStream out = new BitOutputStream(outBuffer);
    this.write(out);
    out.flush();
    return outBuffer.toByteArray();
  }
952440
public byte[] getContentAsByteArray() {
        if (content == null) {
            try {
                content = IOHelper.byteArrayFromStream(is);
            } catch (IOException e) {
                throw new RuntimeException("IOException buffering binary data",
                        e);
            }
            is = null;
        }
        return content;
    }