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