Class AWS2S3Utils
- java.lang.Object
-
- org.apache.camel.component.aws2.s3.utils.AWS2S3Utils
-
public final class AWS2S3Utils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
determineBucketName(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
Reads the bucket name from the header of the given exchange.static String
determineFileExtension(String keyName)
static String
determineFileName(String keyName)
static String
determineKey(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
static long
determineLengthInputStream(InputStream is)
static String
determineStorageClass(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
static void
setEncryption(software.amazon.awssdk.services.s3.model.CreateMultipartUploadRequest.Builder createMultipartUploadRequest, AWS2S3Configuration configuration)
-
-
-
Method Detail
-
determineBucketName
public static String determineBucketName(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
Reads the bucket name from the header of the given exchange. If not provided, it's read from the endpoint configuration.- Parameters:
exchange
- The exchange to read the header fromconfiguration
- The AWS2 S3 configuration- Returns:
- The bucket name.
- Throws:
IllegalArgumentException
- if the header could not be determined.
-
determineStorageClass
public static String determineStorageClass(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
-
determineLengthInputStream
public static long determineLengthInputStream(InputStream is) throws IOException
- Throws:
IOException
-
determineKey
public static String determineKey(org.apache.camel.Exchange exchange, AWS2S3Configuration configuration)
-
setEncryption
public static void setEncryption(software.amazon.awssdk.services.s3.model.CreateMultipartUploadRequest.Builder createMultipartUploadRequest, AWS2S3Configuration configuration)
-
-