Я пытаюсь прочитать файл .txt, присутствующий в ведре другого приложения Google.Как получить доступ к файлу, находящемуся внутри ведра другого приложения
Ниже мой код
GcsInputChannel readChannel = null;
BufferedReader reader = null;
GcsFilename filename = new GcsFilename("abc.appspot.com","For_Prod_Scripts.txt");
GcsService gcsService = GcsServiceFactory.createGcsService();
// We can now read the file through the API:
readChannel = gcsService.openReadChannel(filename,0);
// Again, different standard Java ways of reading from the channel.
reader = new BufferedReader(Channels.newReader(readChannel, "UTF8"));
//CsvReader csvReader = new CsvReader(reader);
String line = reader.readLine();
while ((line = reader.readLine()) != null) {
log.warning("READ:" + line);
}
Я добавил ниже разрешений на разрешения ковшовых и разрешения этого bucket.As, показанном на рисунке ниже объект по умолчанию. 123412341234 - это идентификатор проекта моего другого приложения. Внутри что я доступ к этим ведром
Я получаю ниже исключения
java.lang.RuntimeException: com.[email protected]1f75e55: Unexpected cause of ExecutionException
Я-то здесь отсутствует?