while ((bufferLength = inputStream.read(conversionBufferByteArray)) > 0) { // Proceed while the amount of data stored in the buffer is > 0.
// Write the contents of the conversion buffer to the byte array output stream.
byteArrayOutputStream.write(conversionBufferByteArray, 0, bufferLength);
}
while ((bufferLength = inputStream.read(conversionBufferByteArray)) > 0) { // Proceed while the amount of data stored in the buffer is > 0.
// Write the contents of the conversion buffer to the byte array output stream.
byteArrayOutputStream.write(conversionBufferByteArray, 0, bufferLength);
}