Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

520
Visualizações
How to create a java OutputStream for an S3 object and write value to it?

Existing ways of adding content to an S3 file using methods in AmazonS3 class are

  • by putObject with an InputStream
  • Creating a local file with content and uploading it to S3.

Is there a way an OutputStream can be created for an existing S3 object to which values from a list can be written into? I see there are no APIs for doing so.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

It's possible to create an S3OutputStream which wraps the AmazonS3 client. See this gist for the implementation: https://gist.github.com/blagerweij/ad1dbb7ee2fff8bcffd372815ad310eb It automatically detects large files, and uses multi-part transfers when required. It uses a byte-array for buffering, the size of that buffer depends on your use case. (default is 10MB)

For example:

   final S3Client s3Client = AmazonS3ClientBuilder.defaultClient();
   final OutputStream out = new S3OutputStream(s3Client, "bucket", "path/file.ext");
over 4 years ago · Santiago Trujillo Relatório

0

You can take a look at AWS SDK Performing Operations on an Amazon S3 Object

...
S3Client s3;
...
// Put Object
s3.putObject(bucket,object);
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda