Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
Cómo descargar un archivo de video de amazon s3 a una carpeta específica usando Java

Estoy tratando de descargar un archivo de video de la cuenta S3. No me da un error ni puedo ver el archivo descargado, lo que significa que no obtengo la ubicación del archivo. Tengo una duda de que mi archivo se está descargando. Por favor, dé una solución a esto. Gracias de antemano, aquí está mi código:

 System.out.println("Downloading an object"); S3Object object = s3.getObject(new GetObjectRequest(bucketName, key)); System.out.println("Content-Type: " + object.getObjectMetadata().getContentType()); object.getObjectContent(); }catch(AmazonServiceException ex){ System.out.println("Caught an AmazonServiceException, which means your request made it " + "to Amazon S3, but was rejected with an error response for some reason."); System.out.println("Error Message: " + ex.getMessage()); System.out.println("HTTP Status Code: " + ex.getStatusCode()); System.out.println("AWS Error Code: " + ex.getErrorCode()); System.out.println("Error Type: " + ex.getErrorType()); System.out.println("Request ID: " + ex.getRequestId()); }catch (AmazonClientException ace) { System.out.println("Caught an AmazonClientException, which means the client encountered " + "a serious internal problem while trying to communicate with S3, " + "such as not being able to access the network."); System.out.println("Error Message: " + ace.getMessage()); }
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

object.getObjectContent() proporciona el flujo de datos de la conexión HTTP, ¿hay alguna excepción al leer el flujo? también puedes probar s3.getObjectAsString()

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!