Class S3ContentType

java.lang.Object
com.adaptris.aws2.s3.meta.S3ObjectMetadata
com.adaptris.aws2.s3.meta.S3ContentType
All Implemented Interfaces:
Comparable<S3ObjectMetadata>

public class S3ContentType extends S3ObjectMetadata
  • Constructor Details

    • S3ContentType

      public S3ContentType()
  • Method Details

    • apply

      public void apply(AdaptrisMessage msg, Map<String,String> meta) throws ServiceException
      Specified by:
      apply in class S3ObjectMetadata
      Throws:
      ServiceException
    • getContentType

      @NonNull public @NonNull String getContentType()
      Sets the Content-Type HTTP header indicating the type of content stored in the associated object.

      The value of this header is a standard MIME type. When uploading files, the AWS S3 Java client will attempt to determine the correct content type if one hasn't been set yet. Users are responsible for ensuring a suitable content type is set when uploading streams. If no content type is provided and cannot be determined by the filename, the default content type "application/octet-stream" will be used.

    • setContentType

      public void setContentType(@NonNull @NonNull String contentType)
      Sets the Content-Type HTTP header indicating the type of content stored in the associated object.

      The value of this header is a standard MIME type. When uploading files, the AWS S3 Java client will attempt to determine the correct content type if one hasn't been set yet. Users are responsible for ensuring a suitable content type is set when uploading streams. If no content type is provided and cannot be determined by the filename, the default content type "application/octet-stream" will be used.