Class GoogleCloudStorageEntry
java.lang.Object
io.micronaut.objectstorage.googlecloud.GoogleCloudStorageEntry
- All Implemented Interfaces:
ObjectStorageEntry<com.google.cloud.storage.Blob>
public class GoogleCloudStorageEntry
extends Object
implements ObjectStorageEntry<com.google.cloud.storage.Blob>
An
ObjectStorageEntry
implementation for Google Cloud Storage.- Since:
- 1.0
- Author:
- Pavol Gressa
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull InputStream
@NonNull String
getKey()
The object path on object storage.@NonNull com.google.cloud.storage.Blob
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
-
GoogleCloudStorageEntry
public GoogleCloudStorageEntry(com.google.cloud.storage.Blob blob)
-
-
Method Details
-
getKey
Description copied from interface:ObjectStorageEntry
The object path on object storage. For example/path/to
- Specified by:
getKey
in interfaceObjectStorageEntry<com.google.cloud.storage.Blob>
- Returns:
- object path or empty string if the object is placed at the root of bucket
-
getInputStream
- Specified by:
getInputStream
in interfaceObjectStorageEntry<com.google.cloud.storage.Blob>
- Returns:
- The object content.
-
getNativeEntry
@NonNull public @NonNull com.google.cloud.storage.Blob getNativeEntry()- Specified by:
getNativeEntry
in interfaceObjectStorageEntry<com.google.cloud.storage.Blob>
- Returns:
- The underlying cloud vendor-specific response object.
-
getMetadata
- Specified by:
getMetadata
in interfaceObjectStorageEntry<com.google.cloud.storage.Blob>
- Returns:
- a map with key-value pairs that were stored along the file. An empty map by default.
-
getContentType
- Specified by:
getContentType
in interfaceObjectStorageEntry<com.google.cloud.storage.Blob>
- Returns:
- the MIME type of the entry.
-