Package io.micronaut.objectstorage
Interface ObjectStorageEntry<O>
- Type Parameters:
 O- Cloud vendor-specific response object.
- All Known Implementing Classes:
 AwsS3ObjectStorageEntry,AzureBlobStorageEntry,GoogleCloudStorageEntry,LocalStorageEntry,OracleCloudStorageEntry
public interface ObjectStorageEntry<O>
Object storage entry.
- Since:
 - 1.0
 - Author:
 - Pavol Gressa
 
- 
Method Summary
Modifier and TypeMethodDescription@NonNull InputStream@NonNull StringgetKey()The object path on object storage.default @NonNull io.micronaut.http.server.types.files.StreamedFiledefault @NonNull io.micronaut.http.server.types.files.SystemFile 
- 
Method Details
- 
getKey
The object path on object storage. For example/path/to- Returns:
 - object path or empty string if the object is placed at the root of bucket
 
 - 
getInputStream
- Returns:
 - The object content.
 
 - 
getNativeEntry
- Returns:
 - The underlying cloud vendor-specific response object.
 
 - 
getMetadata
- Returns:
 - a map with key-value pairs that were stored along the file. An empty map by default.
 - Since:
 - 1.1.0
 
 - 
getContentType
- Returns:
 - the MIME type of the entry.
 - Since:
 - 1.1.0
 
 - 
toStreamedFile
@NonNull default @NonNull io.micronaut.http.server.types.files.StreamedFile toStreamedFile()- Returns:
 - a 
StreamedFilefrom this entry. - Since:
 - 1.1.0
 
 - 
toSystemFile
@NonNull default @NonNull io.micronaut.http.server.types.files.SystemFile toSystemFile()- Returns:
 - a 
SystemFilefrom this entry. Note that calling this method will consume thegetInputStream(), which will be closed. - Since:
 - 1.1.0
 
 
 -