Stream file from Google Cloud Storage

后端 未结 4 914
有刺的猬
有刺的猬 2021-01-03 00:54

Here is a code to download File from Google Cloud Storage:

@Override
public void write(OutputStream outputStream) throws IOException {
    try {
        LOG.         


        
4条回答
  •  天涯浪人
    2021-01-03 01:16

    Another (convenient) way to stream a file from Google Cloud Storage, with google-cloud-nio:

    Path path = Paths.get(URI.create("gs://bucket/file.csv"));
    InputStream in = Files.newInputStream(path);
    

提交回复
热议问题