Class AzureBlobStorageEntry

java.lang.Object
io.micronaut.objectstorage.azure.AzureBlobStorageEntry
All Implemented Interfaces:
ObjectStorageEntry<com.azure.core.util.BinaryData>

public class AzureBlobStorageEntry extends Object implements ObjectStorageEntry<com.azure.core.util.BinaryData>
An ObjectStorageEntry implementation for Azure Blob Storage.
Since:
1.0
Author:
Pavol Gressa
  • Constructor Details

    • AzureBlobStorageEntry

      @Deprecated public AzureBlobStorageEntry(@NonNull @NonNull String key, @NonNull @NonNull com.azure.core.util.BinaryData data)
      Parameters:
      key - the key
      data - the binary data
    • AzureBlobStorageEntry

      public AzureBlobStorageEntry(@NonNull @NonNull String key, @NonNull @NonNull com.azure.core.util.BinaryData data, @Nullable @Nullable com.azure.storage.blob.models.BlobProperties blobProperties)
  • Method Details

    • getKey

      @NonNull public @NonNull String getKey()
      Description copied from interface: ObjectStorageEntry
      The object path on object storage. For example /path/to
      Specified by:
      getKey in interface ObjectStorageEntry<com.azure.core.util.BinaryData>
      Returns:
      object path or empty string if the object is placed at the root of bucket
    • getInputStream

      @NonNull public @NonNull InputStream getInputStream()
      Specified by:
      getInputStream in interface ObjectStorageEntry<com.azure.core.util.BinaryData>
      Returns:
      The object content.
    • getNativeEntry

      @NonNull public @NonNull com.azure.core.util.BinaryData getNativeEntry()
      Specified by:
      getNativeEntry in interface ObjectStorageEntry<com.azure.core.util.BinaryData>
      Returns:
      The underlying cloud vendor-specific response object.
    • getBlobProperties

      @Nullable public @Nullable com.azure.storage.blob.models.BlobProperties getBlobProperties()
      Returns:
      The BlobProperties.
      Since:
      1.1.0
    • getMetadata

      @NonNull public @NonNull Map<String,String> getMetadata()
      Specified by:
      getMetadata in interface ObjectStorageEntry<com.azure.core.util.BinaryData>
      Returns:
      a map with key-value pairs that were stored along the file. An empty map by default.
    • getContentType

      @NonNull public @NonNull Optional<String> getContentType()
      Specified by:
      getContentType in interface ObjectStorageEntry<com.azure.core.util.BinaryData>
      Returns:
      the MIME type of the entry.