iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/https/HttpsConnection.java [346:362]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ArrayList<Byte> byteBuffer = new ArrayList<>();
            int nextByte;
            // read(byte[]) reads the byte into the buffer and returns the number
            // of bytes read, or -1 if the end of the stream has been reached.
            while ((nextByte = stream.read()) > -1)
            {
                byteBuffer.add((byte) nextByte);
            }

            int bufferSize = byteBuffer.size();
            byte[] byteArray = new byte[bufferSize];
            for (int i = 0; i < bufferSize; ++i)
            {
                byteArray[i] = byteBuffer.get(i);
            }

            return byteArray;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



provisioning/provisioning-device-client/src/main/java/com/microsoft/azure/sdk/iot/provisioning/device/transport/https/HttpConnection.java [265:281]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ArrayList<Byte> byteBuffer = new ArrayList<>();
        int nextByte;
        // read(byte[]) reads the byte into the buffer and returns the number
        // of bytes read, or -1 if the end of the stream has been reached.
        while ((nextByte = stream.read()) > -1)
        {
            byteBuffer.add((byte) nextByte);
        }

        int bufferSize = byteBuffer.size();
        byte[] byteArray = new byte[bufferSize];
        for (int i = 0; i < bufferSize; ++i)
        {
            byteArray[i] = byteBuffer.get(i);
        }

        return byteArray;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



