From 2680fc88f6696cf8aacb1ffde3bba680170b09e0 Mon Sep 17 00:00:00 2001 From: eahrold <> Date: Sat, 27 Apr 2024 14:39:49 -0500 Subject: [PATCH] GoogleCloudStorageEntity use ReadChannel to create InputStream - Addresses https://github.com/micronaut-projects/micronaut-object-storage/issues/440 --- .../objectstorage/googlecloud/GoogleCloudStorageEntry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/object-storage-gcp/src/main/java/io/micronaut/objectstorage/googlecloud/GoogleCloudStorageEntry.java b/object-storage-gcp/src/main/java/io/micronaut/objectstorage/googlecloud/GoogleCloudStorageEntry.java index fd34c474..49735d2b 100644 --- a/object-storage-gcp/src/main/java/io/micronaut/objectstorage/googlecloud/GoogleCloudStorageEntry.java +++ b/object-storage-gcp/src/main/java/io/micronaut/objectstorage/googlecloud/GoogleCloudStorageEntry.java @@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; +import java.nio.channels.Channels; import java.util.Map; import java.util.Optional; @@ -47,7 +48,7 @@ public String getKey() { @NonNull @Override public InputStream getInputStream() { - return new ByteArrayInputStream(blob.getContent()); + return Channels.newInputStream(blob.reader()); } @NonNull