Does IOUtils.toByteArray(inputStream) method internally close inputStream object?
问题 Here is my code flow for which file content is getting lost and I think may be IOUtils.toByteArray() line is problem, please guide what is actually going wrong here. File content getting lost : InputStream stream = someClient.downloadApi(fileId); byte[] bytes = IOUtils.toByteArray(stream); String mimeType = CommonUtils.fileTypeFromByteArray(bytes); String fileExtension=FormatToExtensionMapping.getByFormat(mimeType).getExtension(); String filePath = configuration.getDownloadFolder() + "/" ;