private InputStream downloadFile(String fileName) throws IOException { File file = DriveUtil.getFileByName(fileName); if (file.getDownloadUrl() != null && file.getDownloadUrl().length() > 0) try { fileSize = file.getFileSize(); return DriveUtil.service.files().get(file.getId()).executeMediaAsInputStream(); } catch (IOException e) { e.printStackTrace(); MAMUtil.writeLog(e); return null; } return null; }