Package io.micronaut.objectstorage.aws
Class AwsS3ObjectStorageEntry
java.lang.Object
io.micronaut.objectstorage.aws.AwsS3ObjectStorageEntry
- All Implemented Interfaces:
ObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
public class AwsS3ObjectStorageEntry
extends Object
implements ObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
An
ObjectStorageEntry
implementation for AWS S3.- Since:
- 1.0
- Author:
- Pavol Gressa
-
Constructor Summary
ConstructorDescriptionAwsS3ObjectStorageEntry
(@NonNull String key, @NonNull software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse> responseInputStream) -
Method Summary
Modifier and TypeMethodDescription@NonNull InputStream
@NonNull String
getKey()
The object path on object storage.@NonNull software.amazon.awssdk.services.s3.model.GetObjectResponse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.objectstorage.ObjectStorageEntry
toStreamedFile, toSystemFile
-
Constructor Details
-
AwsS3ObjectStorageEntry
public AwsS3ObjectStorageEntry(@NonNull @NonNull String key, @NonNull @NonNull software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse> responseInputStream)
-
-
Method Details
-
getKey
Description copied from interface:ObjectStorageEntry
The object path on object storage. For example/path/to
- Specified by:
getKey
in interfaceObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
- Returns:
- object path or empty string if the object is placed at the root of bucket
-
getInputStream
- Specified by:
getInputStream
in interfaceObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
- Returns:
- The object content.
-
getNativeEntry
@NonNull public @NonNull software.amazon.awssdk.services.s3.model.GetObjectResponse getNativeEntry()- Specified by:
getNativeEntry
in interfaceObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
- Returns:
- The underlying cloud vendor-specific response object.
-
getMetadata
- Specified by:
getMetadata
in interfaceObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
- Returns:
- a map with key-value pairs that were stored along the file. An empty map by default.
-
getContentType
- Specified by:
getContentType
in interfaceObjectStorageEntry<software.amazon.awssdk.services.s3.model.GetObjectResponse>
- Returns:
- the MIME type of the entry.
-