org_eclipse_hono_application_client_amqp_ProtonBasedRequestResponseCommandClientTest_java
net.bytebuddy.utility.StreamDrainer
public byte[] drain(InputStream inputStream) throws IOException {
        int currentRead;
        ArrayList<byte[]> previousBytes = new ArrayList<byte[]>();
        byte[] currentArray = new byte[this.bufferSize];
        int currentIndex = 0;
        do {
            if ((currentIndex += Math.max(currentRead = inputStream.read(currentArray, currentIndex, this.bufferSize - currentIndex), 0)) != this.bufferSize) continue;
            previousBytes.add(currentArray);
            currentArray = new byte[this.bufferSize];
            currentIndex = 0;
        } while (currentRead != -1);
        byte[] result = new byte[previousBytes.size() * this.bufferSize + currentIndex];
        int arrayIndex = 0;
        for (byte[] previousByte : previousBytes) {
            System.arraycopy(previousByte, 0, result, arrayIndex++ * this.bufferSize, this.bufferSize);
        }
        System.arraycopy(currentArray, 0, result, arrayIndex * this.bufferSize, currentIndex);
        return result;
    }
 -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.size(): int -> java.util.List.iterator(): java.util.Iterator -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void
 [CALL] -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.add(java.lang.Object): boolean -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.io.InputStream.read(byte[],int,int): int -> java.lang.Math.max(int,int): int -> java.util.List.size(): int -> java.util.List.iterator(): java.util.Iterator -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void -> java.util.Iterator.hasNext(): boolean -> java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int): void [EXIT]